Skip to content

Commit

Permalink
get version from GITHUB_REF_NAME (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
pxb1988 authored Oct 3, 2023
1 parent 9510b74 commit b5bda4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ jobs:
distribution: 'temurin'
cache: 'gradle'
- name: Build dex-tools with Gradle
run: ./gradlew check distZip
run: |
./gradlew "-DGITHUB_REF_NAME=${GITHUB_REF_NAME}" check distZip
- name: Archive dex tools
uses: actions/upload-artifact@v3
if: success()
with:
name: dex-tools-2.2-SNAPSHOT
path: dex-tools/build/distributions/dex-tools-2.2-SNAPSHOT.zip
name: dex-tools
path: dex-tools/build/distributions/dex-tools-*.zip
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.googlecode.d2j'
version = '2.2-SNAPSHOT'
version = System.getProperty('GITHUB_REF_NAME', '2.x').replaceAll('[/ ]','-')
}

defaultTasks('clean','distZip')

This comment was marked as off-topic.

Copy link
@Johirulislam6869
Expand Down

0 comments on commit b5bda4f

Please sign in to comment.