Skip to content

Commit db7451b

Browse files
authored
chore(cd): clear the placeholder npm token so trusted publishing works (#536)
1 parent b90a41a commit db7451b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/cd.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ jobs:
4747
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848
# `lerna publish` uploads via libnpmpublish@4, which supports neither provenance nor
4949
# OIDC trusted publishing, so the upload goes through the npm CLI instead.
50+
#
51+
# NODE_AUTH_TOKEN is cleared on purpose. `setup-node` exports the placeholder
52+
# `XXXXX-XXXXX-XXXXX-XXXXX` when given no token, and the .npmrc it writes points
53+
# `_authToken` at that variable, so npm sends the placeholder as a real credential
54+
# and never attempts the OIDC exchange. The registry masks the rejection as E404.
55+
# With no credential configured, npm falls back to trusted publishing.
5056
- name: 🚀 Publish
5157
run: npm run publish:ci
5258
shell: bash
59+
env:
60+
NODE_AUTH_TOKEN: ''
5361

0 commit comments

Comments
 (0)