Skip to content

Automate npm publishing from version tags - #11

Merged
maotora merged 1 commit into
mainfrom
codex/npm-release-cd
Mar 18, 2026
Merged

Automate npm publishing from version tags#11
maotora merged 1 commit into
mainfrom
codex/npm-release-cd

Conversation

@maotora

@maotora maotora commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • trigger npm publish automatically when a v* tag is pushed
  • keep manual publish as a fallback, but only when run from main
  • require the tag to match the package.json version and point to a commit reachable from main
  • skip publishing if that package version already exists on npm
  • fail early with a clear error when NPM_TOKEN is missing

Verification

  • YAML parse check for .github/workflows/publish.yml

Follow-up

  • add the NPM_TOKEN repository secret if it is not configured yet
  • publish a release by bumping package.json, merging to main, then pushing a matching tag such as v0.2.1

@maotora
maotora merged commit f35ccaa into main Mar 18, 2026
4 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