From c9a0e9816dbc7732059ac0b29ea911bbc3533a9d Mon Sep 17 00:00:00 2001 From: clem Date: Fri, 27 Mar 2026 00:49:14 +0800 Subject: [PATCH] fix: cap release bumps at minor while in 0.x beta BREAKING CHANGE footers and bang-suffixed subjects now trigger a minor bump instead of major, preventing an accidental v1.0.0 release while the project is still in pre-1.0 development. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8fd58a5..5a8175b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,8 +56,9 @@ jobs: BUMP="patch" BODIES=$(git log "${LATEST_TAG}..HEAD" --pretty=%B 2>/dev/null || git log --pretty=%B) SUBJECTS=$(git log "${LATEST_TAG}..HEAD" --pretty=%s 2>/dev/null || git log --pretty=%s) + # BREAKING CHANGE is treated as minor while in 0.x (pre-1.0 beta) if echo "$BODIES" | grep -qE '^BREAKING CHANGE: ' || echo "$SUBJECTS" | grep -qE '^[a-z]+(\(.+\))?!: '; then - BUMP="major" + BUMP="minor" elif echo "$SUBJECTS" | grep -qE '^feat(\(|:)'; then BUMP="minor" fi