Skip to content

ci: no publish on branch creation / empty commit range#17

Merged
julian-goldstein merged 1 commit into
masterfrom
fix-empty-range-noop
Jun 19, 2026
Merged

ci: no publish on branch creation / empty commit range#17
julian-goldstein merged 1 commit into
masterfrom
fix-empty-range-noop

Conversation

@julian-goldstein

Copy link
Copy Markdown
Contributor

Bug (found live during the release-branch demo)

Creating release/v0.6 at the v0.6.0 commit triggered vendor with an empty commit range (v0.6.0..HEAD = nothing). The bump logic fell through to its default and cut a bogus v0.7.0 off the release branch. (Already cleaned up.)

Fix

  • Skip on branch creation — guard detect with github.event.created, so pushing a new branch never publishes. Normal pushes + manual dispatch still run.
  • Empty range = no-op — if there are no new commits since this line's latest release, set ver.skip and gate the checksum/tag/publish steps, instead of bumping. Defense-in-depth (covers re-runs / dispatch on an unchanged tip).

Verified via simulation: empty range → skip; back-patch (release default) → v0.6.1; master minor/patch/major all correct.

On merge

Unmarked subject → master defaults to minor → v0.7.0, cleanly diverging master onto the 0.7 line while release/v0.6 keeps the v0.6.x maintenance line. That's the intended end state (and avoids master stealing the maintenance line's patch numbers — don't use [bump:patch] on master once a release/vX.Y branch exists).

Creating a release/* branch at an existing release commit triggered vendor
with an empty commit range (vX.Y.Z..HEAD = nothing), which fell through the
bump's default and cut a spurious version (a release/v0.6 creation published
v0.7.0). Two guards:

  * skip the pipeline on branch-creation pushes (github.event.created)
  * if there are no new commits since this line's latest release, skip cleanly
    (ver.skip output gates the checksum/tag/publish steps) instead of bumping

Real pushes and manual dispatch are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@julian-goldstein julian-goldstein added this pull request to the merge queue Jun 19, 2026
Merged via the queue into master with commit 7da4f7c Jun 19, 2026
1 check passed
julian-goldstein added a commit that referenced this pull request Jun 19, 2026
After publishing, if master cut a new line (vX.Y.0), fork release/vX.Y at the
same lock commit so back-ports have a home. Patches (Z>0) and flavor builds
don't open a line; existing branches are left alone. Safe because the
branch-creation push is ignored by the detect guard (no spurious release).

Also re-applies the versions.env comment fix that was dropped when #17 merged,
and updates the README back-patch section (auto-creation + name-based scoping).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant