mirror of
https://github.com/asyouplz/SpeechNote.git
synced 2026-07-22 06:43:33 +00:00
fix(ci): use github app token to bypass repository rulesets
- add GitHub App token generation step - use app token in checkout and semantic-release steps - this allows semantic-release to push to protected main branch
This commit is contained in:
parent
2d8bc68615
commit
537a4bb956
1 changed files with 10 additions and 1 deletions
11
.github/workflows/release-auto.yml
vendored
11
.github/workflows/release-auto.yml
vendored
|
|
@ -18,10 +18,19 @@ jobs:
|
|||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
|
||||
steps:
|
||||
# Generate GitHub App token to bypass repository rulesets
|
||||
- name: Generate GitHub App Token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ secrets.APP_ID }}
|
||||
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
|
@ -62,5 +71,5 @@ jobs:
|
|||
|
||||
- name: Run semantic-release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
run: npx semantic-release
|
||||
|
|
|
|||
Loading…
Reference in a new issue