Skip to content

Tag and release the next version from the commits merged into master - #23

Merged
JoeriDijkstra merged 2 commits into
masterfrom
ci/tag-on-version-bump
Oct 19, 2026
Merged

JoeriDijkstra merged 2 commits into
masterfrom
ci/tag-on-version-bump

Conversation

@JoeriDijkstra

@JoeriDijkstra JoeriDijkstra commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Goal

[Devops] Tag and release the CLI from the commits merged into master

Release the CLI without tagging by hand: every merge into master tags and releases the next version when its commits call for one.

Changes

  • New .github/workflows/tag.yml runs on every push to master, one run at a time (concurrency: tag), so a second merge sees the tag the first one pushed.

  • New scripts/tag-release.sh reads the commit subjects since the latest vX.Y.Z tag, including the PR's own commits, and applies only the highest bump:

    • feat: / feature: (with an optional scope or !) → minor
    • fix: / refactor: → patch
    • chore: and anything else (docs:, ci:, merge commits) → no release

    Matching is case-sensitive, and pre-release tags such as v0.5.0-rc1 are ignored as a base. When there's a bump, it tags the pushed commit and pushes the tag.

  • release.yml can also be called as a reusable workflow with a tag input. A tag pushed with GITHUB_TOKEN doesn't trigger the tag-push release, so tag.yml calls it directly. When called, it checks out the tag and sets GORELEASER_CURRENT_TAG. Pushing a v* tag by hand still releases as before, which is how major bumps are done.

  • README: a Releasing section with the bump rules.

Merging this releases v0.6.0: master has three feat: commits since v0.5.0 (flux notifications and the skill refresh). Production already serves /api/delivery/notifications (200), so the notifications CLI is safe to release.

Verification

  • actionlint passes on all workflows.
  • scripts/tag-release.sh was run against a throwaway repo with a local remote:
    • no tags with only chore → nothing; no tags with fix → v0.0.1
    • chore/docs/merge commit → nothing; refactor + chore → patch
    • fix + feat(cli) + fix → minor; feature → minor; feat! → minor
    • Fix:, fixed something, feature-flag: → nothing
    • a re-run on an already tagged commit → nothing
    • every tag reached the remote
  • The workflows haven't run on GitHub yet: the first run is this merge.

@JoeriDijkstra
JoeriDijkstra merged commit b80ca7a into master Oct 19, 2026
2 checks passed
@JoeriDijkstra
JoeriDijkstra deleted the ci/tag-on-version-bump branch October 19, 2026 07:37
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