Skip to content

ci: automate npm version releases with trusted publishing - #16

Merged
albertovincenzi merged 1 commit into
mainfrom
ci/automate-npm-publishing
Oct 19, 2026
Merged

albertovincenzi merged 1 commit into
mainfrom
ci/automate-npm-publishing

Conversation

@albertovincenzi

Copy link
Copy Markdown
Contributor

Publish npm automatically when a merge into main increases the version in js/package.json. Manifest changes that keep the same version skip publishing; downgrades and invalid versions fail. Retain manual recovery and the existing release/X.Y.Z trigger.

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 latest tag 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, repository traceflow-sdk, workflow workflow.yaml, no environment, with npm publish and npm dist-tag allowed. The old NO_TWOFA_NPM_TOKEN secret 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.

@albertovincenzi
albertovincenzi merged commit b9cb670 into main Oct 19, 2026
5 checks passed
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