From cde985d28e8f98943a46430847fd7b70cf6bc910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Fri, 3 Feb 2023 15:52:06 +0100 Subject: [PATCH] Remove deprecated set-output in GitHub workflow for release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completely removing the intermediate step calculating the tag_name as GitHub Actions is now providing this value in the context directly. See https://github.com/orgs/community/discussions/26686 and https://docs.github.com/en/actions/learn-github-actions/contexts#github-context part of #307 Signed-off-by: Aurélien Pupier --- .github/workflows/release-project.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index e9fb31d6..776ca25b 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -30,12 +30,6 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - - 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##*/})" - - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -56,7 +50,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=${{ github.ref_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Deploy with Maven to GitHub Packages and Docker Hub