diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index f5791b0..b3d380c 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -33,8 +33,8 @@ jobs: - name: Extract tag name id: extract_tagname shell: bash - # Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/. - run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})" + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Set up JDK 17 uses: actions/setup-java@v3 @@ -56,7 +56,7 @@ jobs: output_file: custom_maven_settings.xml servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' - name: Set version with Maven - run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }} + run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ env.RELEASE_VERSION }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy with Maven to GitHub Packages and Docker Hub