From 283782edef52be702b10453b307996bacffd10fa Mon Sep 17 00:00:00 2001 From: "Morten R. N." Date: Sun, 2 Aug 2026 18:34:20 +0200 Subject: [PATCH] fix(release): tolerate NO_COMMITS_TO_BUMP on chore/docs-only pushes cz bump exits 21 (NO_COMMITS_TO_BUMP) when the only commits since the last tag are non-bumpable (pure chore:/docs:). It is an error, not a no-op, so a chore-only merge to main failed the bump job. Use -nr 21 to turn that exit code into a clean 0; the existing tag-check step then detects 'no release' and skips publish. --- .github/workflows/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc45ce6..5dd2911 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,9 +55,12 @@ jobs: run: uv tool install "commitizen==4.9.1" - name: Bump - # --yes: accept prompts non-interactively. Exits 0 with no commit when - # there is no version increment (pure chore:/docs: history). - run: cz bump --yes --changelog + # --yes: accept prompts non-interactively. + # -nr 21: do NOT fail (NO_COMMITS_TO_BUMP, exit 21) when the only commits + # since the last tag are non-bumpable (pure chore:/docs:). cz treats + # "no eligible commits" as an error; -nr 21 turns it into a clean exit 0 + # so the tag-check step can detect "no release" and skip publish. + run: cz -nr 21 bump --yes --changelog - name: Check whether a tag was created id: tag_check