Skip to content

Commit 7d1014e

Browse files
committed
ci: fix GitHub Actions permissions for semantic-release
- Add GH_TOKEN fallback for checkout - Configure git author/committer for semantic-release - Enable proper token permissions for pushing tags
1 parent 84aa442 commit 7d1014e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/deploy-storybook.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0 # semantic-release needs full history
28+
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
2829

2930
- name: Setup Node.js
3031
uses: actions/setup-node@v4
@@ -67,6 +68,10 @@ jobs:
6768

6869
- name: Release (semantic-release)
6970
env:
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
7172
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
73+
GIT_AUTHOR_NAME: github-actions[bot]
74+
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
75+
GIT_COMMITTER_NAME: github-actions[bot]
76+
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
7277
run: npx semantic-release

0 commit comments

Comments
 (0)