Commit 1d96553
authored
ci: publish to npm with the npm CLI instead of pnpm (#213)
The `4.0.0` release-please run tagged `package-v4.0.0` and created the
GitHub Release, but the **publish job failed**: it built and signed
provenance, then died on the upload with `404 Not Found - PUT
https://registry.npmjs.org/@alchemy_cms%2fjson_api`.
That is the pnpm OIDC trusted-publishing bug
([pnpm/pnpm#11513](pnpm/pnpm#11513)): pnpm
generates the provenance (via sigstore, which is why that step succeeds)
but does not complete the OIDC→npm auth exchange, so the tarball `PUT`
goes out unauthenticated and npm returns 404. This publishes with the
**npm CLI** instead — upgraded to `>= 11.5.1`, which implements trusted
publishing correctly — while keeping pnpm for install/build.
It also adds a `workflow_dispatch` trigger (and lets the `publish` job
run on it), so the **already-tagged `4.0.0`** can be published without
waiting for a new release event.
After merge: run the workflow manually (Actions → Release Please → Run
workflow) to publish `4.0.0`; subsequent releases publish automatically.
If it still 404s with the npm CLI, the npmjs **trusted publisher**
registration doesn't match — verify it targets repo
`AlchemyCMS/alchemy-json_api` and workflow file `release-please.yml`.1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | | - | |
| 56 | + | |
0 commit comments