File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
name : 发包到 NPM
2
2
3
+ permissions :
4
+ id-token : write # For NPM Provenance, see https://docs.npmjs.com/generating-provenance-statements
5
+
3
6
on :
4
7
push :
5
8
branches :
@@ -46,13 +49,13 @@ jobs:
46
49
if : github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'release')
47
50
env :
48
51
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }} # 使用 NPM 的认证 token
49
- run : pnpm publish --tag prerelease --access public --no-git-checks
52
+ run : pnpm publish --tag prerelease --access public --no-git-checks --provenance
50
53
51
54
- name : 发布到 NPM(使用 tag 的正式版本发布)
52
55
if : startsWith(github.ref, 'refs/tags/')
53
56
env :
54
57
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }} # 使用 NPM 的认证 token
55
- run : pnpm publish --access public --no-git-checks
58
+ run : pnpm publish --access public --no-git-checks --provenance
56
59
57
60
- name : 设置发布类型为正式或预发布
58
61
id : set_release_type
You can’t perform that action at this time.
0 commit comments