Create PRs to reflect publish changes
This commit is contained in:
28
.github/workflows/publish.yml
vendored
28
.github/workflows/publish.yml
vendored
@@ -38,6 +38,9 @@ jobs:
|
||||
run: |
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git config --global user.name "Github Actions"
|
||||
- name: 'Checkout new branch'
|
||||
run: /
|
||||
git checkout -b publish/${{ github.ref }}-${{ github.run_id }}-${{ github.run_number }
|
||||
- name: 'install dependencies'
|
||||
run: |
|
||||
yarn -D
|
||||
@@ -49,9 +52,22 @@ jobs:
|
||||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
PUBLISH_PRERELEASE: ${{ github.event.inputs.prerelease }}
|
||||
- name: 'merge into main branch'
|
||||
if: github.event.inputs.prerelease == '' # unless it's a prerelease
|
||||
run: |
|
||||
git checkout main && \
|
||||
git merge ${{ github.ref }} && \
|
||||
git push
|
||||
- name: 'Create PR to merge into ref branch'
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
base: ${{ github.ref }}
|
||||
branch: 'publish/${{ github.ref }}-${{ github.run_id }}-${{ github.run_number }}'
|
||||
title: 'Published ${{ github.ref }}'
|
||||
body: 'Syncing CHANGELOG and package version updates from publish action ${{github.run_id}}-${{github.run_number}} into ${{ github.ref}} branch'
|
||||
reviewers: ${{ github.actor }}
|
||||
delete-branch: true
|
||||
- name: 'Create PR to merge ref branch into main'
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
base: main
|
||||
branch: ${{ github.ref }}
|
||||
title: 'Published {{ github.ref }}'
|
||||
body: 'Syncing CHANGELOG and package version updates from published ${{ github.ref }} branch into main branch'
|
||||
reviewers: ${{ github.actor }}
|
||||
Reference in New Issue
Block a user