Skip to content

Commit

Permalink
send pr instead of direct push
Browse files Browse the repository at this point in the history
Signed-off-by: yue9944882 <[email protected]>
  • Loading branch information
yue9944882 committed Jan 10, 2022
1 parent 894b3fb commit b41720e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} \
Expand All @@ -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
Expand Down

0 comments on commit b41720e

Please sign in to comment.