Skip to content

ci: auto-publish to npm and GitHub release on version bump - #17

Merged
Irfan-wani merged 1 commit into
mainfrom
ci/npm-release-workflow
Nov 6, 2026
Merged

Irfan-wani merged 1 commit into
mainfrom
ci/npm-release-workflow

Conversation

@Irfan-wani

Copy link
Copy Markdown
Collaborator

Summary

Adds .github/workflows/release.yml, which runs on pushes to main that change package.json (or manually via workflow_dispatch):

  • Reads version from package.json; if that version is not yet on npm, builds (yarn prepare) and publishes with provenance. Pre-release versions (x.y.z-beta.n) go to the next dist-tag.
  • Creates the vX.Y.Z tag and a GitHub release with auto-generated notes (reuses the tag if it already exists).
  • Every step is idempotent, so re-running after a partial failure finishes the remaining steps.

Setup required before merge

  • Add an NPM_TOKEN repo secret (npm automation token with publish rights), or configure npm Trusted Publishing for this repo/workflow.
  • Note: package.json is at 2.0.1, which is not on npm yet (latest is 2.0.0), so the next push to main that touches package.json will publish 2.0.1.
  • The existing release-it script also publishes/tags; use one flow or the other.

🤖 Generated with Claude Code

Publishes the package, tags vX.Y.Z and creates a GitHub release whenever
the version in package.json on main is not yet on npm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Irfan-wani
Irfan-wani merged commit e5ec1d8 into main Nov 6, 2026
0 of 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