Skip to content

Commit f6f77ac

Browse files
authored
Merge pull request #16 from hexagonkt/develop
Create binaries
2 parents f508d07 + b4fdbcf commit f6f77ac

2 files changed

Lines changed: 29 additions & 23 deletions

File tree

.github/workflows/upload_native.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11

2-
name: Upload Native
2+
name: Upload Binaries
33

44
on:
55
release:
66
types: [ published ]
77

88
jobs:
9+
uploadDistribution:
10+
name: Upload Distribution
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run: { shell: bash }
14+
steps:
15+
- name: Check Out
16+
uses: actions/checkout@v3
17+
- name: Set Up Java
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 17
21+
distribution: temurin
22+
cache: gradle
23+
- name: Build Distribution
24+
run: ./gradlew installDist
25+
- name: Rename Distribution
26+
run: mv build/install/codecv build/install/codecv-${{ github.ref_name }}
27+
- name: Archive production artifacts
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: CodeCV-${{ github.ref_name }}
31+
path: build/install/codecv-${{ github.ref_name }}
32+
retention-days: 1
33+
934
uploadNative:
1035
strategy:
1136
fail-fast: false
@@ -19,8 +44,6 @@ jobs:
1944
steps:
2045
- name: Check Out
2146
uses: actions/checkout@v3
22-
with:
23-
token: ${{ secrets.GITHUB_TOKEN }}
2447
- name: Install UPX (Windows)
2548
if: ${{ matrix.os == 'windows-latest' }}
2649
run: choco install upx

build.gradle.kts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99

1010
val os = getProperty("os.name").toLowerCase()
1111

12-
val hexagonVersion = "2.4.4"
12+
val hexagonVersion = "2.4.5"
1313
val hexagonExtraVersion = "2.4.0"
1414
val vertxVersion = "4.3.7"
1515

@@ -23,7 +23,7 @@ apply(from = "$gradleScripts/application.gradle")
2323
apply(from = "$gradleScripts/native.gradle")
2424

2525
group = "com.hexagonkt.tools"
26-
version = "0.9.14"
26+
version = "0.9.15"
2727
description = "CVs for programmers"
2828

2929
ext {
@@ -53,7 +53,7 @@ dependencies {
5353
}
5454

5555
tasks.named("classes") { dependsOn("addResources") }
56-
tasks.named("build") { dependsOn("tarJpackage") }
56+
tasks.named("build") { dependsOn("installDist") }
5757

5858
tasks.create<Copy>("addResources") {
5959
from(projectDir)
@@ -107,20 +107,3 @@ extensions.configure<GraalVMExtension> {
107107
}
108108
}
109109
}
110-
111-
tasks.named<Exec>("upx") {
112-
val source = "$buildDir/native/nativeCompile/${project.name}"
113-
val target = "$buildDir/native/${project.name}"
114-
val command =
115-
if (os.contains("windows")) "upx ${source}.exe -o ${target}.exe"
116-
else "upx $source -o $target"
117-
commandLine(command.split(" "))
118-
}
119-
120-
tasks.named<Zip>("zipNative") {
121-
val arch = getProperty("os.arch").toLowerCase()
122-
val source = if (os.contains("windows")) "${project.name}.exe" else project.name
123-
include(source)
124-
archiveFileName.set("${project.name}-${project.version}-${os}-${arch}.zip")
125-
destinationDirectory.set(buildDir.toPath().resolve("distributions").toFile())
126-
}

0 commit comments

Comments
 (0)