Skip to content

Commit 239a1a9

Browse files
committed
fix(ci): use NODE_AUTH_TOKEN for npm publish auth
setup-node with registry-url creates a project-level .npmrc that expects NODE_AUTH_TOKEN. The manual $HOME/.npmrc was being shadowed, causing 404 errors on publish.
1 parent 0711404 commit 239a1a9

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,8 @@ jobs:
109109
env:
110110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111111

112-
- name: Creating .npmrc
113-
if: env.HAS_CHANGES == 'true'
114-
run: |
115-
cat << EOF > "$HOME/.npmrc"
116-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
117-
EOF
118-
env:
119-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
120-
121112
- name: Publish to npm
122113
if: env.HAS_CHANGES == 'true'
123114
run: pnpm release
124115
env:
125-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
116+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)