ci: publish via npm trusted publishing (OIDC), retire NPM_TOKEN#1
Merged
Conversation
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.
What changed
Converts
.github/workflows/publish-npm.ymlfrom token-based npm auth to npm Trusted Publishing (OIDC), per #201 (ecosystem-wide token-retirement sweep):permissions:gainsid-token: write(keptcontents: read).actions/setup-nodebumped tonode-version: "22"(trusted publishing requires Node >= 22.14.0);registry-urlunchanged.npm install -g npm@latest) — Node 22 bundles npm 10, and trusted publishing requires npm CLI >= 11.5.1.env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}block from the publish step — OIDC is auto-detected by npm CLI, no token needed. No--provenanceflag added (automatic under trusted publishing).No change to triggers, build steps, or what gets published.
Version bump
Patch bump
0.1.2->0.1.3(ci:change, no public-API/behaviour change) — required by the version-increment CI gate even for a workflow-only change.Post-merge expectation
On merge, tag-on-merge fires
publish-npm.ymlforv0.1.3. The OIDC publish will only succeed once the npm-side trusted publisher is configured for orgDIG-Network, repocomponents, workflowpublish-npm.yml, package@dignetwork/components. If that config isn't in place yet, the publish run is expected to fail with an OIDC/auth error — this is expected-pending, not a regression, and will resolve once the npm trusted-publisher config is added.