Commit 9813a30
fix(ci): publish via npx and tag prereleases explicitly
Two issues showed up running the trusted-publisher publish step:
- `npm install -g npm@latest` races against the running bundled npm
("Cannot find module 'promise-retry'") because npm tries to overwrite
its own files mid-install. Run the modern CLI via `npx` from its
separate cache instead — no self-overwrite, same OIDC behavior.
- npm 11+ refuses to publish a prerelease without `--tag`:
"You must specify a tag using --tag when publishing a prerelease
version." Derive the tag from the version's prerelease identifier
so future prereleases (e.g. `-alpha.N`) land on the matching tag
rather than getting bounced. Stable versions still publish to
`latest` (default).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 128ce80 commit 9813a30
1 file changed
Lines changed: 15 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments