fix: gate release on a release-worthy conventional commit#13
Merged
Conversation
release.yml fired on every non-[skip ci] push to main and defaulted to a patch bump, so docs:/chore:/ci: commits cut spurious patch releases -- contradicting AGENTS.md/CONTRIBUTING.md which say those skip the release path. The bump step now sets a release output: true only when a commit subject since the last tag matches feat:/feat!:/fix:/fix!:/BREAKING CHANGE (or there is no prior tag = initial release); otherwise false. All five mutating steps (VERSION write, doc-sync, bump commit, tag, GitHub release) are gated on release == 'true', mirroring the existing skip guard. A mixed push (docs + a real fix) still releases. The [skip ci] guard is kept as an optional override. Initial-release hold and floating-tag/force-push paths are unchanged. Decision logic unit-tested across docs-only/chore/ci/fix/feat/feat!/mixed/initial/refactor. AGENTS.md and CONTRIBUTING.md reworded to match. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements what AGENTS.md/CONTRIBUTING.md already promise:
docs:/chore:/ci:pushes no longer cut spurious patch releases. We've been hand-applying[skip ci]to work around this; the commit-type gate makes that optional.Gating logic (in the "Determine bump type" step)
Scans commit subjects since the last tag and sets a
releaseoutput:feat!:/fix!:/BREAKING CHANGE→release=true, bump majorfeat:→release=true, bump minorfix:→release=true, bump patchrelease=true(held at current VERSION)docs:/chore:/ci:/refactor:/test:/…) →release=falseAll five mutating steps (VERSION write, doc-sync, bump commit, tag, GitHub release) are gated
if: steps.check.outputs.skip == 'false' && steps.bump.outputs.release == 'true', mirroring the existing skip guard. The[skip ci]job guard is kept as an optional override. Initial-release hold and floating-tag force-push paths are untouched. Nopaths:filter (would risk masking a realfix:in a mixed push); the commit-type scan is the source of truth.Proof (decision logic unit-tested locally — same grep as the workflow)
Live SKIP-path and RELEASE-path runs against main will be performed after merge (see below).
Docs aligned (same PR)
AGENTS.mdandCONTRIBUTING.mdreworded to state the scan-based gate, that non-release types run-and-exit without tagging, and that[skip ci]is now an optional override.This merge
Labeled
fix:(it corrects a real defect). The old release.yml evaluates this merge (the new logic only governs pushes after it lands), so thisfix:merge will cut one patch release — expected and correct. Not editing CHANGELOG / CLAUDE**Version:**/ ROADMAP**Current:**(release-owned).🤖 Generated with Claude Code