@@ -30,12 +30,14 @@ jobs:
3030 submodules : recursive
3131 - name : get tag version
3232 run : echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
33- - name : get library version
33+ - name : Get library version
3434 run : |
3535 echo "LIBRARY_VERSION=$(./gradlew properties | grep version | sed 's/version: /v/')" >> $GITHUB_ENV
36- - name : validate library version matches tag
36+ - name : Validate project version matches tag
3737 shell : bash
3838 run : |
39+ echo "Project Version: $PROJECT_VERSION"
40+ echo "Release Tag: $RELEASE_TAG"
3941 [ "$LIBRARY_VERSION" = "$RELEASE_TAG" ]
4042 publish-to-github-release :
4143 # only run if `check-tag` completes successfully
@@ -45,15 +47,19 @@ jobs:
4547 - uses : actions/checkout@v3
4648 with :
4749 submodules : recursive
48- - run : ./gradlew build
50+ - uses : gradle/gradle-build-action@v2
51+ with :
52+ arguments : build
4953 - name : set env
5054 run : echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
51- - uses : actions/checkout@v3
5255 - name : Upload Jar to GitHub release
5356 env :
5457 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5558 # TODO - reusability
5659 # the location of the library(s) should be configurable as an input
57- # parameter rather than being hard coded as `build/lib/*`
58- run : gh release upload "$RELEASE_TAG" build/lib/*
60+ # parameter rather than being hard coded as `build/lib/ion-java...`
61+ # It should also be able to upload more than one file.
62+ run : |
63+ VERSION=$(./gradlew properties | grep version | sed 's/version: /v/')
64+ gh release upload "$RELEASE_TAG" "build/lib/ion-java-$VERSION.jar"
5965 # TODO: Add `publish-to-maven-central` job
0 commit comments