Commit 351612d
ci: publish via OIDC, so no npm token has to exist (#3)
The publish workflow added yesterday needed an NPM_TOKEN secret. Trusted
publishing removes that requirement entirely: the workflow exchanges a
short-lived, workflow-scoped OIDC credential with npm at publish time, so
nothing long-lived is stored and there is no secret to leak or rotate.
Two things this workflow would have failed on, from the npm docs:
- Node 22 bundles npm 10.x, but trusted publishing requires npm >= 11.5.1.
Node 24 ships npm 11, so the runtime is bumped rather than adding a
separate npm upgrade step.
- `NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}` passed an empty string with no
secret set. The documented OIDC example sets no token at all — the
`id-token: write` permission already present is what does the work.
Provenance stops needing the flag: npm generates attestations automatically
for a public package published from a public repo via OIDC.
Matches the identical change in ai-forms, so the two libraries keep releasing
the same way.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent c62d5bf commit 351612d
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | | - | |
42 | | - | |
| |||
0 commit comments