From d88849dfa978bd515fcdd8b3f2cbe88725dade8e Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Thu, 7 Jul 2022 08:53:10 +0100 Subject: [PATCH] Separate commit and push in release workflow - Fixes #452 --- .github/workflows/release-milestone.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-milestone.yml b/.github/workflows/release-milestone.yml index 9294a5e5..759e6bd3 100644 --- a/.github/workflows/release-milestone.yml +++ b/.github/workflows/release-milestone.yml @@ -42,6 +42,15 @@ jobs: -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-${{ github.event.inputs.milestone }}' \ -B echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV + - name: Tag Release + env: + PROJECT_VERSION: ${{ env.PROJECT_VERSION }} + run: | + git config --global user.name github-actions[bot] + git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com + git checkout -b $PROJECT_VERSION + git commit -a -m "Release $PROJECT_VERSION" + git tag "v$PROJECT_VERSION" - name: Build and Publish env: DISABLE_SAMPLES: true @@ -50,12 +59,12 @@ jobs: jfrog rt mvn clean install \ -DskipTests -U -B jfrog rt build-publish - - name: Tag Release - uses: jvalkeal/build-zoo-handler@v0.0.4 - with: - tag-release-branch: ${{ env.PROJECT_VERSION }} - tag-release-tag: ${{ env.PROJECT_VERSION }} - tag-release-tag-prefix: v + - name: Push Release + env: + PROJECT_VERSION: ${{ env.PROJECT_VERSION }} + run: | + git push origin $PROJECT_VERSION + git push --tags origin - name: Output id: output env: