mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Update CI for prerelease and backports (#646)
* Update CI for prerelease and backports * Fix * Update permissions * Apply suggestions from code review Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * comment --------- Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
co-authored by
Mateusz Burzyński
parent
5273feb188
commit
70a83f1bd1
@@ -4,6 +4,8 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- "maintenance/v*" # branch rulesets don't support v[0-9]+
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@@ -21,9 +23,7 @@ jobs:
|
||||
outputs:
|
||||
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
|
||||
permissions:
|
||||
contents: write # to create release (changesets/action)
|
||||
issues: write # to post issue comments (changesets/action)
|
||||
pull-requests: write # to create pull request (changesets/action)
|
||||
contents: read # to check out repo (actions/checkout)
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
@@ -42,6 +42,8 @@ jobs:
|
||||
with:
|
||||
client-id: ${{ vars.APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
permission-contents: write # to create version commits (changesets/action)
|
||||
permission-pull-requests: write # to create pull request (changesets/action)
|
||||
|
||||
- name: Create or update release pull request
|
||||
id: changesets
|
||||
@@ -65,12 +67,12 @@ jobs:
|
||||
with:
|
||||
client-id: ${{ vars.APP_CLIENT_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
permission-contents: write # to bypass branch and tag protection rules (release.ts)
|
||||
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: true
|
||||
# we need this token to bypass the branch and tag protection rules
|
||||
persist-credentials: false
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- uses: ./.github/actions/ci-setup
|
||||
|
||||
Reference in New Issue
Block a user