Skip to content

Commit 67f86eb

Browse files
committed
chore: update release workflow to install latest npm and enhance debugging output
1 parent 4bacf8e commit 67f86eb

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ permissions:
1616
jobs:
1717
publish:
1818
runs-on: ubuntu-latest
19-
environment: npm
2019
steps:
2120
- name: Checkout
2221
uses: actions/checkout@v5
@@ -34,6 +33,9 @@ jobs:
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

0 commit comments

Comments
 (0)