From b41720e4cbeeca7e766c8bebb95906441aa8b588 Mon Sep 17 00:00:00 2001 From: yue9944882 <291271447@qq.com> Date: Fri, 7 Jan 2022 11:35:00 +0800 Subject: [PATCH] send pr instead of direct push Signed-off-by: yue9944882 <291271447@qq.com> --- .github/workflows/release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dffd0c304f..c318bbd8ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,7 @@ jobs: exec:exec | perl -ne 'die unless m/${{ github.event.inputs.releaseVersion }}-SNAPSHOT/' - name: Release Prepare run: | + git checkout -b 'automated-release-${{ github.event.inputs.releaseVersion }}' mvn --batch-mode \ release:prepare \ -Dtag=v${{ github.event.inputs.releaseVersion }} \ @@ -74,8 +75,16 @@ jobs: run: | # The tests are already executed in the prepare, skipping mvn -DlocalCheckout=true -Darguments=-DskipTests release:perform - git push https://${{ github.token }}@github.com/${{ github.repository }}.git ${{ github.ref_name }}:${{ github.ref_name }} + git push https://${{ github.token }}@github.com/${{ github.repository }}.git \ + automated-release-${{ github.event.inputs.releaseVersion }}:automated-release-${{ github.event.inputs.releaseVersion }} git push https://${{ github.token }}@github.com/${{ github.repository }}.git v${{ github.event.inputs.releaseVersion }} + - name: Pull Request + uses: repo-sync/pull-request@v2 + with: + source_branch: automated-release-${{ github.event.inputs.releaseVersion }} + destination_branch: ${{ github.ref_name }} + github_token: ${{ secrets.GITHUB_TOKEN }} + pr_title: "Automated Release: ${{ github.event.inputs.releaseVersion }}" - name: Publish Release if: ${{ github.event.inputs.dry-run != 'true' }} uses: ncipollo/release-action@v1