ci: publish with npm trusted publishing instead of a stored token - #60
Open
mikhailak wants to merge 1 commit into
Open
ci: publish with npm trusted publishing instead of a stored token#60mikhailak wants to merge 1 commit into
mikhailak wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From a fork: we hold only
pullhere 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 publishbecause yarn 1 cannot do OIDC and treatspublishas 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).repositorynow names this repo, which provenance requires.Needs one npm-side step: register a trusted publisher for the package.