Skip to content

ci: require an explicit semver for version bumps - #1193

Merged
gildesmarais merged 1 commit into
mainfrom
ci/explicit-bump-version
Oct 22, 2026
Merged

gildesmarais merged 1 commit into
mainfrom
ci/explicit-bump-version

Conversation

@gildesmarais

Copy link
Copy Markdown
Member

What changed

  • .github/workflows/bump-version.yml accepts only version (X.Y.Z). The check matches the whole string, and the bump step reads $TARGET_VERSION from the environment.
  • .github/release-drafter.yml moves the how-to-release steps into an HTML comment and adds compare/$PREVIOUS_TAG...v$RESOLVED_VERSION.
  • AGENTS.md dispatches with gh workflow run bump-version.yml --ref main -f version=X.Y.Z.

Why

The workflow resolved auto, patch, minor, and major on its own, and the draft notes rendered the maintainer steps. The first semver check used line-oriented grep, so a multiline version could overwrite the job output and expand into the bump command.

Risk

  • Callers that still pass bump_type or custom_version fail until they pass version.
  • bin/bump-version still treats major, minor, and patch as relative bumps when run directly. The workflow no longer sends those words.

Review map

No test delta — start at .github/workflows/bump-version.yml.

Validation

  • Local bash probe: accepts 1.4.0, v1.4.0, and 1.2.3-rc.1; rejects patch, auto, minor, major, custom, and a two-line value.
  • Workflow not dispatched.

The bump workflow resolved the version itself, and published notes showed the release steps without a compare link. Dispatch now accepts only X.Y.Z, and those steps stay in an HTML comment.
@gildesmarais
gildesmarais merged commit 9889c8d into main Oct 22, 2026
15 checks passed
@gildesmarais
gildesmarais deleted the ci/explicit-bump-version branch October 22, 2026 16:02
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