Skip to content

Commit 9e38d4f

Browse files
docs(readme): add npm authentication and publishing notes
Add Publishing Notes section explaining: - npm trusted publishing via GitHub Actions OIDC - Fallback NPM_TOKEN authentication - Node.js and npm version requirements for trusted publishing Add corresponding Chinese translation in README.zh-CN.md. Co-Authored-By: Hagicode <noreply@hagicode.com> Signed-off-by: newbe36524 <newbe36524@qq.com>
1 parent e360602 commit 9e38d4f

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,13 @@ npm run pack:check
104104
```
105105

106106
The published entry point is `bin/skillsbase.mjs`. In development, `npm run cli -- <args>` runs the TypeScript entry directly.
107+
108+
## Publishing Notes
109+
110+
The GitHub Actions workflow supports two npm authentication modes:
111+
112+
- Preferred: npm trusted publishing via GitHub Actions OIDC
113+
- Fallback: `NPM_TOKEN` repository secret mapped to `NODE_AUTH_TOKEN`
114+
115+
Before relying on trusted publishing, make sure the npm package settings for `@hagicode/skillsbase` trust the `HagiCode-org/skillsbase` repository.
116+
The npm docs currently require Node.js `>= 22.14.0` and npm `>= 11.5.1` for trusted publishing.

README.zh-CN.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,13 @@ npm run pack:check
104104
```
105105

106106
发布入口为 `bin/skillsbase.mjs`。开发期可用 `npm run cli -- <args>` 直接运行 TypeScript 入口。
107+
108+
## 发布说明
109+
110+
GitHub Actions 发布流支持两种 npm 认证模式:
111+
112+
- 推荐:GitHub Actions OIDC 的 npm trusted publishing
113+
- 兜底:仓库 `NPM_TOKEN` secret,经 `NODE_AUTH_TOKEN` 注入
114+
115+
若使用 trusted publishing,需先在 npm 的 `@hagicode/skillsbase` 包设置中,将 `HagiCode-org/skillsbase` 配置为 trusted publisher。
116+
npm 官方当前要求 Node.js `>= 22.14.0` 且 npm `>= 11.5.1`

0 commit comments

Comments
 (0)