fix(release): rebase tap clone before push to avoid non-fast-forward#18
Merged
Conversation
The "Update Homebrew tap" step cloned homebrew-tap, committed the new formula, and pushed with no reconciliation. When the tap's main advanced between clone and push (concurrent writers), git rejected the push as a non-fast-forward, failing the release after the GitHub Release had already been published. Insert `git pull --rebase --autostash` before the push so the formula commit is rebased onto the current remote tip.
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.
What
Insert
git pull --rebase --autostashbefore thegit pushin the Update Homebrew tap step ofrelease.yml.Why
Release run for v0.0.12 failed at the tap-update step:
The step did
clone → edit formula → commit → pushwith no reconciliation. Whenhomebrew-tap'smainadvanced between the clone and the push (concurrent writers to the shared tap repo), git rejected the push as a non-fast-forward — failing the release after the GitHub Release and binaries had already been published.Fix
Rebase the formula commit onto the current remote tip before pushing.
--autostashis defensive (there's nothing dirty in the fresh clone, but it costs nothing).Notes
version "0.0.12". This PR just prevents recurrence.actions/checkout,actions/setup-go,action-gh-release). Unrelated to this failure; can be addressed separately.🤖 Generated with Claude Code