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.
This commit is contained in:
justsisyphus
2026-01-30 12:57:15 +09:00
parent 9e07b143df
commit 390c25197f

View File

@@ -192,7 +192,12 @@ jobs:
if: steps.check.outputs.skip != 'true'
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Configure npm for OIDC publishing
if: steps.check.outputs.skip != 'true'
run: |
echo "registry=https://registry.npmjs.org/" > ~/.npmrc
echo "//registry.npmjs.org/:_authToken=" >> ~/.npmrc
- name: Publish ${{ matrix.platform }}
if: steps.check.outputs.skip != 'true'