Migrate to OIDC on publishing npm packages in GitHub Actions
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
从 issue 中列出的未勾选 workflow 文件开始,尤其是 nodejs/node-core-test 和 nodejs/caritat,并将它们与已勾选的迁移进行比较。首先验证 npm trusted-publisher 的要求和现有的 workflow 权限。当剩余的 npm 发布 workflow 不再使用 NPM_TOKEN,并具备所需的 OIDC 配置时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
See https://docs.npmjs.com/trusted-publishers for documentations.
[!note]
Trusted publishing requires npm CLI version 11.5.1 or later.
TL;DR: add the following section in the workflow file to replace ${secrets.NPM_TOKEN}, and create OICD connection on https://www.npmjs.com/package/<package-name>/access:
permissions:
id-token: write # Required for OIDC
contents: read
This should help us get rid of npm tokens in GitHub Actions for publishing packages.
Quick search on npm token usages: https://github.com/search?q=org%3Anodejs+path%3A%22.github%2Fworkflows%22+%22npm+publish%22&type=code
- 主要语言
- JavaScript
- 星标
- 202
- 派生
- 183
- 平均合并
- 13 天 12 小时
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodejs/admin 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
tsc-agenda
难度 5/5 一周以上 新手友好度 30/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 30/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
antfu-collective/icones#398 ·
-
ECmail.com 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
wesbos/burner-email-providers#554 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
radiantearth/stac-browser#1023 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
components-web-app/docs#92 ·