Skip to content

fix(ci): gate publish on the release commit actually landing - #5

Merged
Piccirello merged 1 commit into
mainfrom
fix/gate-publish-on-the-actual-commit
Aug 5, 2026
Merged

fix(ci): gate publish on the release commit actually landing#5
Piccirello merged 1 commit into
mainfrom
fix/gate-publish-on-the-actual-commit

Conversation

@Piccirello

Copy link
Copy Markdown
Member

Summary

Follow-up to #4. When the version bump moved to ghcommit-action, the job's committed output was repointed at the new pre-commit dirty-tree check, so it now means "there was something to commit" rather than "the commit landed".

That matters because publish is gated if: always() && needs.version-bump.outputs.committed == 'true'. If the ghcommit step fails, committed is still true, so publish runs anyway. It no-ops thanks to check-package-version, but it succeeds — and notify-released then posts a "released successfully" message for a release that never happened.

Changes

  • Point the committed output at steps.commit-version-bump.outputs.commit-hash != '', which is only non-empty when ghcommit-action actually created the commit

The dirty-tree check step stays as the if: guard on the commit step itself, which is what it is for.

Testing

Not run end to end (the release job sits behind an approval gate). ghcommit-action writes commit-hash only on the success path — it exits 0 without setting any output when it detects no changes, and the step fails outright if the mutation is rejected. So an empty commit-hash covers both "nothing committed" and "commit failed", which is exactly the condition publish should gate on.

The committed output was repointed at the dirty-tree check, so a failed
ghcommit step still read as true and let publish and the released Slack
notice run for a release that never happened.
@Piccirello
Piccirello merged commit 6adcd96 into main Aug 5, 2026
11 checks passed
@Piccirello
Piccirello deleted the fix/gate-publish-on-the-actual-commit branch August 5, 2026 04:41
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