Commit b4c2cc8
ci: stop setup-node writing the empty auth token that broke OIDC
The v0.24.3 publish failed with E404 and I read it as a missing trusted
publisher on npmjs.com. It was this file.
`registry-url` makes setup-node write
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
into an .npmrc. That is right for token auth and quietly fatal under trusted
publishing: with no NODE_AUTH_TOKEN the line resolves to an empty token, npm
believes it already has credentials, and never attempts the OIDC exchange. The
registry answers the unauthenticated PUT with E404 — an error naming neither
OIDC nor trusted publishing, which is what sent me looking at the registry
config rather than at the workflow. actions/setup-node#1551, and npm/cli#9088
tracks the misleading diagnostics.
Dropping registry-url writes no .npmrc, and npm defaults to
registry.npmjs.org, which is where we publish.
Also:
- node 24 rather than 22, which bundles npm 11 and has been reported to settle
OIDC handshakes that 22 did not. The npm floor check stays, so this does not
depend on what a runner image ships.
- `--provenance` back on the publish. npm documents it as automatic under
trusted publishing but reports disagree; asking explicitly cannot give a
weaker result, and it is what v0.24.2 published with.
- the header now separates the two causes of that E404 instead of asserting the
wrong one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 854d5a5 commit b4c2cc8
1 file changed
Lines changed: 32 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
59 | 77 | | |
60 | 78 | | |
61 | | - | |
| 79 | + | |
62 | 80 | | |
63 | | - | |
64 | 81 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
69 | 85 | | |
70 | 86 | | |
71 | 87 | | |
| |||
122 | 138 | | |
123 | 139 | | |
124 | 140 | | |
125 | | - | |
126 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
127 | 145 | | |
128 | 146 | | |
129 | | - | |
| 147 | + | |
130 | 148 | | |
131 | 149 | | |
132 | 150 | | |
| |||
0 commit comments