Skip to content

Publish workflow: check the tag, match CI, create a release - #187

Merged
w8r merged 1 commit into
masterfrom
ci/publish-workflow
Sep 30, 2026
Merged

w8r merged 1 commit into
masterfrom
ci/publish-workflow

Conversation

@w8r

@w8r w8r commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Updates .github/workflows/publish.yml, which runs when a v*.*.* tag is pushed.

  • Tag / version check first. The job stops with a clear error if the tag doesn't match package.json (for example v0.9.1 while package.json says 0.9.0), before anything is built or published. Tested locally with a matching and a mismatching tag.
  • Same checks as CI: adds npm run format:check next to lint, typecheck, tests and build.
  • Node 22 (active LTS) instead of 20.
  • GitHub release: after a successful publish, gh release create --verify-tag --generate-notes creates a release for the tag, with notes generated from the merged PRs. That needs contents: write, which is now set in permissions.
  • Unchanged: npm authentication via secrets.NPM_TOKEN and --provenance.

To release 0.9.0 after merging: git tag v0.9.0 && git push origin v0.9.0.

- Fail early if the pushed tag does not match the package.json version.
- Run the format check too, on Node 22 like the rest of the tooling.
- Create a GitHub release with generated notes after publishing.
@w8r
w8r merged commit faf79a1 into master Sep 30, 2026
3 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