Skip to content

Commit f27fd97

Browse files
margropclaude
andcommitted
ci: npm 发布恢复 --provenance 和 registry-url,并输出 OIDC 认证日志便于排查
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b6279ae commit f27fd97

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/packages.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
- uses: actions/setup-node@v4
8181
with:
8282
node-version: '24'
83+
registry-url: 'https://registry.npmjs.org'
8384

8485
- uses: actions/download-artifact@v4
8586
with:
@@ -92,7 +93,10 @@ jobs:
9293
npm --version
9394
tag=latest
9495
if [[ "$GITHUB_REF_NAME" == *-* ]]; then tag=next; fi
95-
npm publish ./dist/wrong-notebook-*.tgz --access public --tag "$tag"
96+
# OIDC 换取令牌失败时 npm 只在 verbose 日志中说明原因,这里筛出认证相关的行
97+
npm publish ./dist/wrong-notebook-*.tgz --access public --provenance --tag "$tag" --loglevel verbose 2>&1 \
98+
| grep -viE '^npm (notice|verbose) +[0-9.]+[kMB]* ' \
99+
| grep -iE 'oidc|trust|token|auth|provenance|publish|error|^\+ '
96100
97101
desktop:
98102
name: Desktop (${{ matrix.name }})

0 commit comments

Comments
 (0)