Repository navigation
ci: automate npm version releases with trusted publishing - #16
Merged
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.
Publish npm automatically when a merge into
mainincreases the version injs/package.json. Manifest changes that keep the same version skip publishing; downgrades and invalid versions fail. Retain manual recovery and the existingrelease/X.Y.Ztrigger.Replace the expired npm publishing token with GitHub OIDC trusted publishing. The publish job uses npm 11.21.0, publishes the tested archive, and verifies the private package's
latesttag through OIDC. Correct the package repository URL to match the trusted GitHub repository. No package visibility changes are made.One-time external setup is still required in npm package settings: GitHub organization
smartpricing, repositorytraceflow-sdk, workflowworkflow.yaml, no environment, withnpm publishandnpm dist-tagallowed. The oldNO_TWOFA_NPM_TOKENsecret is no longer used.Validation: five release-selection tests covering unchanged versions, numeric version increases, downgrades, manual runs and release branches; simulated main push events against real repository commits; full build and isolated archive checks; actionlint. The existing CI also runs all 136 SDK tests.