Skip to content

Commit c2cefa9

Browse files
committed
fix: add permissions to GitHub Actions workflow for tag pushing
1 parent e01e184 commit c2cefa9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ jobs:
88
runs-on: ubuntu-latest
99
# 当具有 release 标签的 PR 被合并时,自动发布包版本
1010
if: contains(github.event.pull_request.labels.*.name, 'release') && github.event.pull_request.merged == true
11+
permissions:
12+
contents: write
13+
packages: write
1114

1215
steps:
1316
- uses: actions/checkout@v3
1417
with:
1518
fetch-depth: 0
16-
token: ${{ secrets.GITHUB_TOKEN }}
19+
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
1720

1821
- name: Install Node.js
1922
uses: actions/setup-node@v3

0 commit comments

Comments
 (0)