Skip to content

Commit 48d26e9

Browse files
committed
ich kann das alles nichtmehr
1 parent fa9d426 commit 48d26e9

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/build-release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,17 @@ jobs:
3737
- name: Build Java JAR
3838
run: ./gradlew clean build
3939

40+
- name: Get Gradle version
41+
id: gradle_version
42+
run: |
43+
echo "VERSION=$(./gradlew -q printVersion)" >> $GITHUB_ENV
44+
4045
- name: Prepare release-artifacts folder
4146
shell: pwsh
4247
run: |
4348
New-Item -ItemType Directory -Path "release-artifacts" -Force
4449
Copy-Item -Path "src/main/resources/native/SMTC4J.dll" -Destination "release-artifacts/SMTC4J.dll" -Force
45-
Copy-Item -Path "build/libs/SMTC4J-${GITHUB_REF_NAME}.jar" -Destination "release-artifacts/SMTC4J.jar" -Force
50+
Copy-Item -Path "build/libs/SMTC4J-$env:VERSION.jar" -Destination "release-artifacts/SMTC4J-$env:VERSION.jar" -Force
4651
4752
- name: List release artifacts
4853
run: dir release-artifacts

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ java {
1919
}
2020
}
2121

22+
tasks.register('printVersion') {
23+
doLast {
24+
println project.version
25+
}
26+
}
27+
2228
def nativeDownloadDir = layout.buildDirectory.dir("native-download").get().asFile
2329
def downloadedNativeDllFile = nativeDownloadDir.toPath().resolve("SMTC4J.dll").toFile()
2430
def resourcesNativeDir = layout.buildDirectory.dir("resources/main/native").get().asFile

0 commit comments

Comments
 (0)