Skip to content

Commit d0f8b53

Browse files
committed
fix: restore OIDC auth setup for npm trusted publishing
Add back registry-url, remove _authToken from npmrc, and unset NODE_AUTH_TOKEN so npm falls back to OIDC for authentication. These were lost when the workflow was modified for beta tag support.
1 parent 0924a4b commit d0f8b53

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ jobs:
3030
- uses: actions/setup-node@v4
3131
with:
3232
node-version: 24
33+
registry-url: 'https://registry.npmjs.org'
3334
cache: pnpm
3435

36+
- name: Remove token auth from npmrc (use OIDC instead)
37+
run: sed -i '/_authToken/d' "$NPM_CONFIG_USERCONFIG"
38+
3539
- name: Install
3640
run: pnpm install
3741

@@ -50,4 +54,6 @@ jobs:
5054
fi
5155
5256
- name: Publish
53-
run: npm publish --tag ${{ steps.npm-tag.outputs.tag }} --access public --provenance
57+
run: |
58+
unset NODE_AUTH_TOKEN
59+
npm publish --tag ${{ steps.npm-tag.outputs.tag }} --access public --provenance

0 commit comments

Comments
 (0)