fix(ci): use PAT for semantic-release to trigger build workflow
GITHUB_TOKEN events cannot trigger other workflows by design. Use a fine-grained PAT (RELEASE_TOKEN secret) so the tag push from semantic-release triggers the build.yml workflow.
This commit is contained in:
@@ -20,9 +20,12 @@ jobs:
|
|||||||
name: Semantic Release
|
name: Semantic Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# Use a PAT so that the tag push triggers the build workflow.
|
||||||
|
# GITHUB_TOKEN events don't trigger other workflows (by design).
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@@ -41,5 +44,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Run semantic-release
|
- name: Run semantic-release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
run: npx semantic-release
|
run: npx semantic-release
|
||||||
|
|||||||
Reference in New Issue
Block a user