fix: update semantic versioning rules to prevent automated major bumps

This commit is contained in:
GitHub Actions
2026-01-16 04:28:50 +00:00
parent b395610158
commit d9c56d2e6b

View File

@@ -3,10 +3,9 @@ name: Auto Versioning and Release
# SEMANTIC VERSIONING RULES:
# - PATCH (0.14.1 → 0.14.2): fix:, perf:, refactor:, docs:, style:, test:, build:, ci:
# - MINOR (0.14.1 → 0.15.0): feat:, feat(...):
# - MAJOR (0.14.1 → 1.0.0): feat!:, fix!:, or "BREAKING CHANGE: <description>" (NOT "BREAKING CHANGE: None")
# - MAJOR (0.14.1 → 1.0.0): MANUAL ONLY - Create git tag manually when ready for 1.0.0
#
# ⚠️ IMPORTANT: Do NOT use "BREAKING CHANGE: None" in commit messages - it triggers a major bump!
# Instead, omit the BREAKING CHANGE line entirely if there are no breaking changes.
# ⚠️ Major version bumps are intentionally disabled in automation to prevent accidents.
on:
push:
@@ -34,16 +33,13 @@ jobs:
with:
# The prefix to use to create tags
tag_prefix: "v"
# Regex pattern for major version bump (breaking changes)
# Matches ONLY actual breaking changes, not "BREAKING CHANGE: None"
# Pattern: !: in commit type OR "BREAKING CHANGE:" followed by non-None text
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__/"
# Regex pattern for minor version bump (new features)
# Matches: "feat:" prefix in commit messages (Conventional Commits)
minor_pattern: "/(feat|feat\\()/"
# Regex pattern for patch version bump (bug fixes)
# Matches: "fix:" prefix in commit messages
patch_pattern: "/(fix|fix\\()/"
# Patch bumps: All other commits (fix:, chore:, etc.) are treated as patches by default
# Pattern to determine formatting
version_format: "${major}.${minor}.${patch}"
# If no tags are found, this version is used