Commit 8911488
committed
fix(ci): Upgrade npm before publish to enable OIDC trusted-publisher path
Node 22 (the setup-node version this workflow pins) ships with npm 10.x.
npm 10 can SIGN provenance via OIDC (the --provenance flag works) but
the actual PUT to publish still authenticates with NODE_AUTH_TOKEN. With
a configured Trusted Publisher on npmjs.com and no NPM_TOKEN secret
provided, the publish PUT runs with an empty token and npm responds
`404 Not Found - PUT ...` -- which is the exact failure mode the v0.9.0
release just hit (publish provenance succeeded, then PUT failed).
Token-less OIDC publish via Trusted Publisher was added in npm 11.5.1.
Add a step that upgrades the global npm to latest before `npm publish`
so the publish step picks up the OIDC-aware code path.
The Node major (22) is intentionally pinned; only npm itself is bumped.1 parent d315e0d commit 8911488
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
| |||
0 commit comments