Skip to content

Commit b5bda4f

Browse files
authored
get version from GITHUB_REF_NAME (#605)
1 parent 9510b74 commit b5bda4f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/gradle.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ jobs:
2424
distribution: 'temurin'
2525
cache: 'gradle'
2626
- name: Build dex-tools with Gradle
27-
run: ./gradlew check distZip
27+
run: |
28+
./gradlew "-DGITHUB_REF_NAME=${GITHUB_REF_NAME}" check distZip
2829
2930
- name: Archive dex tools
3031
uses: actions/upload-artifact@v3
3132
if: success()
3233
with:
33-
name: dex-tools-2.2-SNAPSHOT
34-
path: dex-tools/build/distributions/dex-tools-2.2-SNAPSHOT.zip
34+
name: dex-tools
35+
path: dex-tools/build/distributions/dex-tools-*.zip

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ allprojects {
33
apply plugin: 'idea'
44
apply plugin: 'eclipse'
55
group = 'com.googlecode.d2j'
6-
version = '2.2-SNAPSHOT'
6+
version = System.getProperty('GITHUB_REF_NAME', '2.x').replaceAll('[/ ]','-')
77
}
88

99
defaultTasks('clean','distZip')

0 commit comments

Comments
 (0)