From 045ae03e7816ba84277c7b51d719f49bbec43eaa Mon Sep 17 00:00:00 2001 From: Florian Bruggisser Date: Thu, 8 Dec 2022 15:55:50 +0100 Subject: [PATCH] updated automatic version detection in ci --- .github/workflows/build.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a59329f..3cc497e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,6 @@ name: Build on: workflow_dispatch: inputs: - tag: - description: 'Version Tag' - required: false - default: '0.8.2' publishReleases: description: 'Publish to Releases' required: false @@ -24,6 +20,15 @@ jobs: distribution: 'temurin' java-version: '11' + - name: Get Library Version + id: get_version + run: | + lib_version="$(./gradlew properties | grep ^version: | cut -d' ' -f2)" + echo "Library Version: $lib_version" + echo "version=$lib_version" >> $GITHUB_OUTPUT + echo "v_version=v$lib_version" >> $GITHUB_OUTPUT + shell: bash + - name: Build Release Package run: | ./gradlew releaseProcessingLib --no-daemon @@ -47,9 +52,9 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: release/* - tag: "v${{ github.event.inputs.tag }}-alpha" - release_name: "Version ${{ github.event.inputs.tag }}" - body: "Prebuilt deep-vision-processing libs version ${{ github.event.inputs.tag }}." + tag: "${{ steps.get_version.outputs.v_version }}" + release_name: "Version ${{ steps.get_version.outputs.version }}" + body: "Prebuilt deep-vision-processing libs version ${{ steps.get_version.outputs.v_version }}." overwrite: true file_glob: true prerelease: true