Skip to content

Commit 390c251

Browse files
committed
fix: manually create .npmrc without token for OIDC
setup-node with registry-url injects NODE_AUTH_TOKEN secret which is revoked. Create .npmrc manually with empty _authToken to force OIDC authentication.
1 parent 9e07b14 commit 390c251

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish-platform.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ jobs:
192192
if: steps.check.outputs.skip != 'true'
193193
with:
194194
node-version: "24"
195-
registry-url: "https://registry.npmjs.org"
195+
196+
- name: Configure npm for OIDC publishing
197+
if: steps.check.outputs.skip != 'true'
198+
run: |
199+
echo "registry=https://registry.npmjs.org/" > ~/.npmrc
200+
echo "//registry.npmjs.org/:_authToken=" >> ~/.npmrc
196201
197202
- name: Publish ${{ matrix.platform }}
198203
if: steps.check.outputs.skip != 'true'

0 commit comments

Comments
 (0)