Skip to content

Commit e1ebf13

Browse files
authored
Merge pull request #2077 from yue9944882/cherrypick-14-release-job-pr
Cherrypick(release-14): Release job send pr instead of direct push
2 parents 894b3fb + b41720e commit e1ebf13

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/release.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
exec:exec | perl -ne 'die unless m/${{ github.event.inputs.releaseVersion }}-SNAPSHOT/'
5959
- name: Release Prepare
6060
run: |
61+
git checkout -b 'automated-release-${{ github.event.inputs.releaseVersion }}'
6162
mvn --batch-mode \
6263
release:prepare \
6364
-Dtag=v${{ github.event.inputs.releaseVersion }} \
@@ -74,8 +75,16 @@ jobs:
7475
run: |
7576
# The tests are already executed in the prepare, skipping
7677
mvn -DlocalCheckout=true -Darguments=-DskipTests release:perform
77-
git push https://${{ github.token }}@github.com/${{ github.repository }}.git ${{ github.ref_name }}:${{ github.ref_name }}
78+
git push https://${{ github.token }}@github.com/${{ github.repository }}.git \
79+
automated-release-${{ github.event.inputs.releaseVersion }}:automated-release-${{ github.event.inputs.releaseVersion }}
7880
git push https://${{ github.token }}@github.com/${{ github.repository }}.git v${{ github.event.inputs.releaseVersion }}
81+
- name: Pull Request
82+
uses: repo-sync/pull-request@v2
83+
with:
84+
source_branch: automated-release-${{ github.event.inputs.releaseVersion }}
85+
destination_branch: ${{ github.ref_name }}
86+
github_token: ${{ secrets.GITHUB_TOKEN }}
87+
pr_title: "Automated Release: ${{ github.event.inputs.releaseVersion }}"
7988
- name: Publish Release
8089
if: ${{ github.event.inputs.dry-run != 'true' }}
8190
uses: ncipollo/release-action@v1

0 commit comments

Comments
 (0)