File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ permissions:
1616jobs :
1717 publish :
1818 runs-on : ubuntu-latest
19- environment : npm
2019 steps :
2120 - name : Checkout
2221 uses : actions/checkout@v5
3433 scope : ' @winner-fed'
3534 always-auth : true
3635
36+ - name : Update npm to latest
37+ run : npm install -g npm@latest
38+
3739 - name : Install Dependencies
3840 run : pnpm install --frozen-lockfile
3941
@@ -57,11 +59,20 @@ jobs:
5759 echo "=== npm 版本信息 ==="
5860 npm --version
5961 echo ""
62+ echo "=== 检查 .npmrc 文件 ==="
63+ cat ~/.npmrc 2>/dev/null || echo "未找到 .npmrc 文件"
64+ echo ""
6065 echo "=== 检查 npm 认证状态 ==="
6166 npm whoami || echo "未认证或认证失败"
6267 echo ""
6368 echo "=== 检查作用域配置 ==="
6469 npm config get @winner-fed:registry || echo "未找到作用域配置"
70+ echo ""
71+ echo "=== 检查认证 token 格式 ==="
72+ if [ -n "$NODE_AUTH_TOKEN" ]; then
73+ echo "Token 长度: ${#NODE_AUTH_TOKEN}"
74+ echo "Token 前缀: ${NODE_AUTH_TOKEN:0:20}..."
75+ fi
6576
6677 - name : Publish to npm
6778 run : npm publish --access public --provenance
You can’t perform that action at this time.
0 commit comments