Skip to content

Commit 9afcb39

Browse files
fix: bun publish 通过 ~/.npmrc 配置 registry 认证
1 parent c80a6d0 commit 9afcb39

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ jobs:
3737
- name: Run tests
3838
run: bun test
3939

40+
- name: Configure npm registry auth
41+
run: |
42+
cat > ~/.npmrc << EOF
43+
//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
44+
EOF
45+
4046
- name: Publish to npm
4147
run: bun publish --access public
42-
env:
43-
BUN_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
4448

4549
- name: Generate changelog
4650
id: changelog

0 commit comments

Comments
 (0)