Commit 638f15b
committed
fix(publish): gate --provenance on GITHUB_ACTIONS to unbreak local runs
`npm publish --provenance` requires the GitHub Actions OIDC
id-token endpoint — running the script locally (or in any non-GHA
environment) fails with:
"Provenance generation in GitHub Actions requires 'id-token: write'
permission"
Guarded the flag behind `process.env.GITHUB_ACTIONS === 'true'` so
local emergency publishes (classic npm-token auth, no OIDC) still
work. CI runs unchanged — GITHUB_ACTIONS is always `true` there, so
provenance attestations are attached to every CI-published tarball
exactly as before.
Same fix was applied to stuie's scripts/publish.mts earlier today
and is going out to socket-packageurl-js / socket-sdk-js in
parallel commits.1 parent 1ae9941 commit 638f15b
1 file changed
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
426 | 427 | | |
427 | | - | |
| 428 | + | |
| 429 | + | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
| |||
0 commit comments