Skip to content

Commit fa6e62b

Browse files
committed
fix(release): add npm OIDC provenance support
1 parent a6cf16c commit fa6e62b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
# 赋予 release-please-action 权限
88
permissions:
99
contents: write
10+
id-token: write
1011
pull-requests: write
1112
jobs:
1213
# 设置 release-please 任务
@@ -36,11 +37,14 @@ jobs:
3637
# 复制插件列表到 package.json
3738
- run: npm run cp
3839
if: ${{ steps.release.outputs.release_created }}
40+
# 更新 npm 到最新版本以支持 OIDC
41+
- run: npm install -g npm@latest
42+
if: ${{ steps.release.outputs.release_created }}
3943
# 发布到 npm
40-
- run: npm run pub
44+
- run: npm run pub --provenance
4145
if: ${{ steps.release.outputs.release_created }}
4246
env:
4347
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4448
# 同步npm包
4549
- run: npm run sync
46-
if: ${{ steps.release.outputs.release_created }}
50+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)