Skip to content

fix: gate release on a release-worthy conventional commit#13

Merged
TMHSDigital merged 2 commits into
mainfrom
fix/release-gate-conventional-commits
Jun 19, 2026
Merged

fix: gate release on a release-worthy conventional commit#13
TMHSDigital merged 2 commits into
mainfrom
fix/release-gate-conventional-commits

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

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 release output:

  • feat!: / fix!: / BREAKING CHANGErelease=true, bump major
  • feat:release=true, bump minor
  • fix:release=true, bump patch
  • no last tag (initial release) → release=true (held at current VERSION)
  • anything else (docs:/chore:/ci:/refactor:/test:/…) → release=false

All 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. No paths: filter (would risk masking a real fix: in a mixed push); the commit-type scan is the source of truth.

Proof (decision logic unit-tested locally — same grep as the workflow)

docs-only      -> release=false   chore+ci   -> release=false   refactor   -> release=false
fix-only       -> release=true patch         feat-only  -> release=true minor
feat!-breaking -> release=true major         MIXED docs+fix -> release=true patch (fix not masked)
initial(no tag)-> release=true

Live SKIP-path and RELEASE-path runs against main will be performed after merge (see below).

Docs aligned (same PR)

AGENTS.md and CONTRIBUTING.md reworded 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 this fix: merge will cut one patch release — expected and correct. Not editing CHANGELOG / CLAUDE **Version:** / ROADMAP **Current:** (release-owned).

🤖 Generated with Claude Code

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>
@TMHSDigital TMHSDigital reopened this Jun 19, 2026
Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels Jun 19, 2026
@TMHSDigital TMHSDigital merged commit f5b567a into main Jun 19, 2026
8 checks passed
@TMHSDigital TMHSDigital deleted the fix/release-gate-conventional-commits branch June 19, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant