fix: Disable automated major version bumps in CI#543
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an auto-versioning issue where commits containing "BREAKING CHANGE:" text (including "BREAKING CHANGE: None") were incorrectly triggering major version bumps. The solution disables automated major version bumps entirely, requiring manual git tag creation for major releases.
Changes:
- Modified
major_patternregex to use an unmatchable pattern (/__MANUAL_MAJOR_BUMP_ONLY__/) - Updated workflow comments to document manual-only major version bump requirement
- Removed
patch_patternconfiguration (not supported by the semantic-version action)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| major_pattern: "/__MANUAL_MAJOR_BUMP_ONLY__/" | ||
| # Regex pattern for minor version bump (new features) | ||
| # Matches: "feat:" prefix in commit messages (Conventional Commits) | ||
| minor_pattern: "/(feat|feat\\()/" |
There was a problem hiding this comment.
The minor_pattern includes redundant logic. The pattern /(feat|feat\\()/ matches both feat and feat(, but since feat alone would match both cases, the feat\\( alternative is unnecessary. Consider simplifying to "/feat/" or if you need to be explicit about scopes, use "/feat(\\(|:)/" to match feat: or feat(.
| minor_pattern: "/(feat|feat\\()/" | |
| minor_pattern: "/feat(\\(|:)/" |
| major_pattern: "/(feat|fix|chore|refactor|perf|test|docs|style|build|ci)!:|BREAKING CHANGE:(?!\\s*None)/" | ||
| # Regex pattern for major version bump - DISABLED (manual only) | ||
| # Use a pattern that will never match to prevent automated major bumps | ||
| major_pattern: "/__MANUAL_MAJOR_BUMP_ONLY__/" |
There was a problem hiding this comment.
The pattern uses double underscores which, while functional as an unmatchable pattern, is not a standard regex practice. A more conventional approach would be to use a pattern that explicitly cannot match any valid commit message, such as "^(?!.*).*$" (matches nothing) or simply an empty string "" if the action supports it. However, the current pattern is clear in intent and will work correctly, so this is a style preference rather than a functional issue.
| major_pattern: "/__MANUAL_MAJOR_BUMP_ONLY__/" | |
| major_pattern: "^(?!.*).*$" |
🚨 Supply Chain Verification Results❌ FAILED 📦 SBOM Summary
🔍 Vulnerability Scan
📎 Artifacts
Generated by Supply Chain Verification workflow • View Details |
Problem
Auto-versioning workflow was incorrectly calculating v1.0.0 due to commits containing "BREAKING CHANGE:" text (even "BREAKING CHANGE: None").
Solution
Changes
.github/workflows/auto-versioning.yml:major_patternto/__MANUAL_MAJOR_BUMP_ONLY__/(never matches)patch_pattern(not supported by semantic-version action)Impact
git tag -a v1.0.0 -m "Release 1.0.0"Testing
Related to previous DNS feature merge that should have created v0.15.0.