Skip to content

ci: automate version bumping on merge to main#96

Merged
randomBrainstormer merged 1 commit into
mainfrom
ci/auto-version-bump
Jun 5, 2026
Merged

ci: automate version bumping on merge to main#96
randomBrainstormer merged 1 commit into
mainfrom
ci/auto-version-bump

Conversation

@randomBrainstormer

Copy link
Copy Markdown
Owner

What

Adds a GitHub Action that bumps the package version automatically, once, on main, after a PR is merged — so we stop bumping by hand in every feature PR.

Why

Manual per-PR bumping has two problems:

  1. It's a step that's easy to forget.
  2. Version collisions — PRs developed in parallel both grab the same next version (e.g. Fix: persist refreshed tokens and auto-recover from invalid_grant (#86) #94 and Fix: private/busy events without start/end break calendar display (#27) #95 both wanted 1.2.3), because neither branch knows about the other.

Bumping at merge time, on main, removes the manual step and makes collisions impossible (bumps are serialized on main).

How it works

  • Trigger: a PR is merged into main.
  • Default bump is patch. For a bigger jump, add a minor or major label to the PR before merging.
  • npm version updates package.json + package-lock.json, commits (chore: bump version to X [skip ci]), and creates a git tag. [skip ci] prevents a re-trigger loop, and a title guard skips the bot's own bump commit.

Contributor impact: none. No commit-message conventions required (unlike release-please / semantic-release). Just write code; the version takes care of itself.

⚠️ Before this works

  • Branch protection on main: if direct pushes are restricted, either allow github-actions[bot] to bypass, or switch the push to use a PAT. Without that the action will fail to push.
  • Stop hand-bumping: once this lands, feature PRs should not touch the version. (PR Fix: private/busy events without start/end break calendar display (#27) #95 still has a manual 1.2.4 bump from before this existed — fine to keep for that one.)

Test plan

  • Merge a trivial PR and confirm the action pushes a chore: bump version to 1.2.x commit + tag to main, and does not loop.
  • Merge a PR labeled minor and confirm a minor bump.

@randomBrainstormer randomBrainstormer merged commit 11efe01 into main Jun 5, 2026
@randomBrainstormer randomBrainstormer deleted the ci/auto-version-bump branch June 5, 2026 11:42
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