Skip to content

ci(release): treat no commits since the tag as nothing to release - #41

Merged
chezhj merged 1 commit into
masterfrom
ccr-1c33a5e6-rkilpz
Oct 12, 2026
Merged

chezhj merged 1 commit into
masterfrom
ccr-1c33a5e6-rkilpz

Conversation

@chezhj

@chezhj chezhj commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Problem

The "Nothing to release" check ended in an error (Release run #2, https://github.com/chezhj/simflow/actions/runs/38303660881). The failing step was Commitizen bump; its log:

cz --no-raise 21 bump --yes --changelog
[NO_COMMITS_FOUND]
No new commits found.

HEAD was the bump commit that carries the v2.10.3 tag, so there were no commits at all since the last tag. commitizen reports that as NO_COMMITS_FOUND (exit 3), which is different from NO_COMMITS_TO_BUMP (exit 21: commits exist but none is bumpable). The action's no_raise defaults to 21 only, so exit 3 failed the job.

This was a gap in my earlier testing: I tried only the "docs commit since the tag" case (21), and the weekmenu reference only covered that one too. Running Release twice in a row is the more likely real-world way to hit "nothing to release".

Fix

release.yml:

  • no_raise: "3,21" on the commitizen-action step (the input is comma-delimited; I read action.yml and entrypoint.sh at 0.27.1). With a no-raise code cz exits 0, so the action carries on and version equals previous_version, which the existing "Evaluate result" step already turns into bumped=false, a notice and the "Nothing to release" summary, and deploy is skipped.
  • Reworded the notice/summary text to cover both cases ("no new commits, or none that is bumpable").
  • Comment explains both exit codes.

No other file changes, no version bump (ci(release)).

Evidence (local; the action itself only runs on GitHub)

The exact invocation the action builds, cz --no-raise 3,21 bump --yes --changelog, in three clones at v2.10.3:

Scenario exit files changed result
A. HEAD is the tag commit (the failing run) 0 (was 3 with --no-raise 21) 0 NO_COMMITS_FOUND, nothing created
B. only a docs: commit since the tag 0 0 NO_COMMITS_TO_BUMP, nothing created
C. a fix(x): commit since the tag 0 bump commit still bumps 2.10.3 → 2.10.4, content check OK, tag v2.10.4

The "Evaluate result" script, extracted from the YAML and run with the env the action would give it: equal versions → bumped=false plus the new "Nothing to release" notice/summary; 2.10.3 → 2.10.4 → bumped=true version=2.10.4 tag=v2.10.4. release.yml parses with a single on: key. cz check passes on the commit message and this title, and the pr-title style rules print OK.

Not verified

On GitHub: that the action, with cz exiting 0 on a no-raise code, sets version equal to previous_version and pushes nothing in this case. That is read from entrypoint.sh (version is set after the bump when the exit is 0) and matches how the exit-21 case behaved in the reference, but only a run proves it. After merging, run Release again with increment: auto; HEAD will be this PR's squash commit (a ci: commit, so case B) and should end with "Nothing to release". To also exercise case A, run it once more after a bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YJdTaQX9f79fBVtRXhPJQ7


Generated by Claude Code

Running Release twice in a row (HEAD is already the tag commit) made
commitizen exit 3 (NO_COMMITS_FOUND), which the action's default
no_raise of 21 does not cover, so the bump job failed instead of ending
with "Nothing to release". Whitelist 3 as well as 21 and say so in the
summary text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJdTaQX9f79fBVtRXhPJQ7
@chezhj
chezhj merged commit e287312 into master Oct 12, 2026
3 checks passed
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.

2 participants