Skip to content

Commit 43feafd

Browse files
committed
ci: Configure npm registry without _authToken for trusted publishing
setup-node's registry-url option writes an _authToken=${NODE_AUTH_TOKEN} line into .npmrc. Without NODE_AUTH_TOKEN set, this resolves to an empty token that takes precedence over OIDC auth, causing a 404 on publish. Use npm config set instead to configure the registry without injecting the auth token line, allowing npm --provenance to use OIDC directly.
1 parent 1814ec7 commit 43feafd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/gnd-binary-build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ jobs:
208208
with:
209209
node-version: 22
210210

211+
- name: Configure npm registry
212+
run: npm config set registry https://registry.npmjs.org/
213+
211214
- name: Download gnd binary
212215
env:
213216
GH_TOKEN: ${{ github.token }}
@@ -281,6 +284,9 @@ jobs:
281284
with:
282285
node-version: 22
283286

287+
- name: Configure npm registry
288+
run: npm config set registry https://registry.npmjs.org/
289+
284290
- name: Create wrapper package
285291
shell: bash
286292
run: |

0 commit comments

Comments
 (0)