From af2cb33bea1a9cf19a32082449c592a121de5a7a Mon Sep 17 00:00:00 2001 From: Jan Robert Date: Mon, 18 Sep 2023 15:02:41 +0200 Subject: [PATCH] ci: automate approval process --- .github/workflows/3.approve-snapshot.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/3.approve-snapshot.yml b/.github/workflows/3.approve-snapshot.yml index 2bbfbca0c..c9ff267c5 100644 --- a/.github/workflows/3.approve-snapshot.yml +++ b/.github/workflows/3.approve-snapshot.yml @@ -25,10 +25,11 @@ jobs: java-version: 18 - name: Define docker variables run: | - export version=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) - if [[ "$version" == *"SNAPSHOT"* ]]; then - echo "Dealing with a snapshot version. Current version: ${{ version }}" - echo "New version: ${ version //-SNAPSHOT//g }" + export VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout) + echo "version=$VERSION" >> $GITHUB_ENV + if [[ "$env.version" == *"SNAPSHOT"* ]]; then + echo "Dealing with a snapshot version. Current version: ${{ env.version }}" + echo "New version: ${ env.version //-SNAPSHOT//g }" else - echo "Already released. Current version: ${ version }" + echo "Already released. Current version: ${ env.version }" fi \ No newline at end of file