Skip to content

ci: require a version bump on every PR - #187

Merged
ccampbell-aai merged 1 commit into
mainfrom
ccampbell/version-bump-check
Sep 21, 2026
Merged

ccampbell-aai merged 1 commit into
mainfrom
ccampbell/version-bump-check

Conversation

@ccampbell-aai

@ccampbell-aai ccampbell-aai commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Version Bump Check workflow (mirrors assemblyai-python-sdk#236) that runs on every PR into main and fails unless package.json's "version" is strictly greater than the base branch's version.
  • Also requires a matching ## [x.y.z] heading in CHANGELOG.md, since Node releases ship both files together (see any chore(release) commit).
  • Versions are compared with semver (pinned 7.6.3 via npx, --include-prerelease so a prerelease head still counts as a bump); unparseable versions fail with a clear error.
  • Escape hatch: add the skip-version-bump label (created in this repo) to a PR that intentionally ships no release (CI-only, docs-only). The trigger includes labeled/unlabeled, so applying or removing the label re-runs the check without a new push.
  • This PR is CI-only, so it carries the skip-version-bump label rather than a bump.

Why

Publishing is release-driven off main, so a merge without a bump means the next release either re-uses a version or needs a follow-up bump. Nothing enforced this before; #173 nearly merged without one.

Follow-up after merge

Add Version incremented as a required status check on main in branch protection. Until then the job is advisory only.

Test plan

  • Workflow YAML parses; prettier clean
  • Compare step simulated locally: bumped passes, unchanged fails, downgrade fails, bumped-without-CHANGELOG-entry fails, prerelease bump passes the version step
  • Check fails on this PR when unlabeled (base 4.41.3 == head 4.41.3) — run
  • Adding skip-version-bump → job skipped — run
  • Temporary 4.41.3 → 4.41.4 + CHANGELOG entry commit passes the check in CI, then reverted — run

🤖 Generated with Claude Code

@ccampbell-aai
ccampbell-aai force-pushed the ccampbell/version-bump-check branch from 0673039 to a09e0fe Compare September 19, 2026 23:22
@ccampbell-aai ccampbell-aai added the skip-version-bump PR intentionally ships no release; bypasses the Version Bump Check label Sep 19, 2026
Adds a Version Bump Check workflow that runs on every PR into main and
fails unless package.json's "version" is strictly greater than the base
branch's (compared with semver) and CHANGELOG.md has a matching
"## [x.y.z]" entry. The skip-version-bump label bypasses it for PRs that
intentionally ship no release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ccampbell-aai
ccampbell-aai force-pushed the ccampbell/version-bump-check branch from a09e0fe to 37bcb4f Compare September 19, 2026 23:28
@ccampbell-aai
ccampbell-aai marked this pull request as ready for review September 19, 2026 23:32
@ccampbell-aai
ccampbell-aai merged commit faab357 into main Sep 21, 2026
4 checks passed
@ccampbell-aai
ccampbell-aai deleted the ccampbell/version-bump-check branch September 21, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-version-bump PR intentionally ships no release; bypasses the Version Bump Check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants