Skip to content

ci: publish with npm trusted publishing instead of a stored token - #60

Open
mikhailak wants to merge 1 commit into
w3tech:mainfrom
mikhailak:ci/trusted-publishing
Open

ci: publish with npm trusted publishing instead of a stored token#60
mikhailak wants to merge 1 commit into
w3tech:mainfrom
mikhailak:ci/trusted-publishing

Conversation

@mikhailak

Copy link
Copy Markdown
Contributor

From a fork: we hold only pull here since the transfer, so this is the change ready for whoever gets write back.

The stored token stopped working because the account it belonged to is no longer a maintainer of the package, so CI cannot ship 0.7.0 or the axios fix in it. OIDC has no credential to go stale: npm mints one per run, bound to this repo and workflow file.

npm publish because yarn 1 cannot do OIDC and treats publish as a version prompt. checkout/setup-node to v7, Node to 24 (OIDC needs npm 11.5.1 on Node 22.14+, and 18 is EOL). repository now names this repo, which provenance requires.

Needs one npm-side step: register a trusted publisher for the package.

The token this workflow used stopped working because the account it
belonged to is no longer a maintainer of the package, so CI cannot ship
0.7.0 and the axios security fix in it. A stored credential has that
failure mode; OIDC does not, since npm mints one per run bound to this
repository and workflow file.

yarn 1 cannot do OIDC and treats `publish` as a version-bumping prompt,
so the publish step is `npm publish`. Install and build stay on yarn.

Bumps checkout and setup-node to v7 and Node to 24: trusted publishing
needs npm 11.5.1 on Node 22.14+, and Node 18 is past end of life.

`repository` now names w3tech/ankr.js. It still pointed at the old
Ankr-network URL, and provenance requires it to match the repository the
publish runs from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant