Commit aa9199f
committed
fix(ci): clear setup-node .npmrc to enable OIDC trusted publishing
setup-node with `registry-url` writes `always-auth=true` +
`_authToken=${NODE_AUTH_TOKEN}` to the user-level .npmrc, but we don't
pass a `token` input. NODE_AUTH_TOKEN is empty at runtime, so npm
sends an empty Authorization header on PUT and npmjs responds with
`Not Found`. OIDC discovery never engages because npm thinks the
registry is already (badly) authenticated.
Overwrite the userconfig with just `registry=https://registry.npmjs.org/`
so npm sees no static auth for the registry, hits the OIDC path, and
exchanges the GitHub Actions id-token for a publish token via the
trusted publishers we registered yesterday.1 parent 01df3ea commit aa9199f
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
| |||
0 commit comments