Files
Waleed 27972e1a30 ci(npm): publish every npm package through trusted publishing (#9790)
* ci(npm): publish every npm package through trusted publishing

The four publish workflows authenticate to npm with the runner's OIDC
token instead of the long-lived NPM_TOKEN secret, so no npm credential is
stored anywhere and every release carries a provenance attestation.

- Publish jobs request id-token: write and run Node 24, whose npm 11
  is required for trusted publishing.
- sim and sim-setup pack once with bun, which rewrites workspace: ranges,
  smoke-test that tarball, then npm publish the same tarball, so what was
  tested is what ships. The smoke tests now also assert the bumped version.
- sim-setup republishes when its own workflow changes, as sim already does.
- simstudio gets the repository field provenance requires.
- The setup action drops its registry-url input, which existed only to
  feed NODE_AUTH_TOKEN.

* ci(npm): publish from a GitHub-hosted job that alone can mint the OIDC token

npm trusted publishing accepts OIDC tokens only from GitHub-hosted runners,
and the publish jobs ran on Blacksmith by default. Each workflow now builds,
tests, packs and smoke-tests on its usual runner with read-only permissions,
then hands the tarball to a GitHub-hosted publish job, the only one granted
id-token: write. That job runs no repository code, so no test or dependency
can mint an npm credential. The TypeScript SDK's GitHub release moves to its
own job with contents: write.
2026-11-07 14:09:04 -08:00
..