Skip to content

Commit 3669516

Browse files
committed
ci: update npm Trusted Publishers configuration in publish workflow
Update the GitHub Actions workflow to remove explicit registry-url setting and add npm configuration verification for Trusted Publishers authentication. This change ensures proper OIDC authentication handling for npm publishing. 更新 GitHub Actions 工作流程,移除明确的 registry-url 设置, 并为 Trusted Publishers 认证添加 npm 配置验证。 此更改确保 npm 发布的 OIDC 认证处理正确。 Change-Id: I6ec830ceaeac7d364e90296df041f24bb119f5c4 Signed-off-by: OhYee <[email protected]>
1 parent fd102e2 commit 3669516

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/publish.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ jobs:
7070
uses: actions/setup-node@v4
7171
with:
7272
node-version: '20'
73-
registry-url: 'https://registry.npmjs.org'
73+
# Note: Do NOT set registry-url here, let npm CLI handle OIDC auth
7474

7575
- name: Upgrade npm for Trusted Publishers
7676
run: |
7777
npm --version
7878
npm install -g npm@latest
7979
npm --version
80+
# Verify npm is configured correctly for Trusted Publishers
81+
npm config list
8082
8183
- name: Determine test version
8284
id: version
@@ -163,13 +165,15 @@ jobs:
163165
uses: actions/setup-node@v4
164166
with:
165167
node-version: '20'
166-
registry-url: 'https://registry.npmjs.org'
168+
# Note: Do NOT set registry-url here, let npm CLI handle OIDC auth
167169

168170
- name: Upgrade npm for Trusted Publishers
169171
run: |
170172
npm --version
171173
npm install -g npm@latest
172174
npm --version
175+
# Verify npm is configured correctly for Trusted Publishers
176+
npm config list
173177
174178
- name: Determine version
175179
id: config
@@ -298,13 +302,15 @@ jobs:
298302
uses: actions/setup-node@v4
299303
with:
300304
node-version: '20'
301-
registry-url: 'https://registry.npmjs.org'
305+
# Note: Do NOT set registry-url here, let npm CLI handle OIDC auth
302306

303307
- name: Upgrade npm for Trusted Publishers
304308
run: |
305309
npm --version
306310
npm install -g npm@latest
307311
npm --version
312+
# Verify npm is configured correctly for Trusted Publishers
313+
npm config list
308314
309315
- name: Determine version
310316
id: version

0 commit comments

Comments
 (0)