We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edb4afe commit 0d99e71Copy full SHA for 0d99e71
.github/workflows/publish.yaml
@@ -22,6 +22,13 @@ jobs:
22
23
- name: Setup bun
24
uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
25
+ - name: Setup Node.js for OIDC
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ # 必须指定 >=20 的 Node.js 版本,以确保 npm >= 11.5 支持 OIDC
29
+ node-version: "20.x"
30
+ # 这是 OIDC 发布的核心配置,告诉 npm 使用 GitHub OIDC 令牌
31
+ registry-url: "https://registry.npmjs.org"
32
# 安装依赖
33
- name: Install dependencies
34
run: bun install
@@ -38,4 +45,4 @@ jobs:
38
45
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
39
46
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
47
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41
- npm_config_registry: https://registry.npmjs.org
48
+ # npm_config_registry: https://registry.npmjs.org
0 commit comments