Commit fcbe7cd
ci: set up npm trusted publishing
Publish to npm via GitHub Actions OIDC instead of a long-lived
NPM_TOKEN secret.
- Bump semantic-release 17 -> 25, which pulls in @semantic-release/npm
v13. OIDC token exchange landed in @semantic-release/npm v13.1.0, and
v13 bundles npm 11.x (trusted publishing needs npm >= 11.5.1).
- Move the release out of the test matrix into its own job so that
`id-token: write` is scoped to the publish step only, and grant the
permissions semantic-release needs now that the workflow declares an
explicit permissions block.
- Drop the NPM_TOKEN env var. With trusted publishing configured,
@semantic-release/npm exchanges the Actions OIDC token for a
short-lived registry token and never reads NPM_TOKEN.
- Add publishConfig.access=public so the scoped package keeps publishing
publicly, and bump CI to Node 22 because semantic-release v25 requires
^22.14.0 || >=24.10.0 (yarn v1 hard-fails on engine mismatch).
Provenance attestations are generated automatically for public packages
published from a public repo via OIDC, so no --provenance flag is needed.
Co-Authored-By: Steven <229881+styfle@users.noreply.github.com>1 parent 295d101 commit fcbe7cd
3 files changed
Lines changed: 2147 additions & 2973 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | | - | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
41 | 65 | | |
42 | | - | |
43 | 66 | | |
44 | 67 | | |
45 | | - | |
46 | 68 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
0 commit comments