Skip to content

Commit e6bba04

Browse files
committed
Fix: Use npm config to set OIDC token directly
1 parent e2a4b67 commit e6bba04

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ jobs:
5757
const token = await core.getIDToken('https://registry.npmjs.org');
5858
core.setOutput('token', token);
5959
60+
- name: Configure npm with OIDC token
61+
run: |
62+
npm config set //registry.npmjs.org/:_authToken "${{ steps.oidc.outputs.token }}"
63+
npm config set @willwade:registry https://registry.npmjs.org/
64+
6065
- name: Publish to npm (Trusted Publishing)
6166
run: npm publish --access public --provenance
62-
env:
63-
NODE_AUTH_TOKEN: ${{ steps.oidc.outputs.token }}
67+
68+
- name: Show npm debug log on failure
69+
if: failure()
70+
run: cat ~/.npm/_logs/*-debug-0.log | tail -100

0 commit comments

Comments
 (0)