Repository navigation
Publish a Homebrew formula on release - #30
Merged
Merged
Conversation
Enables cargo-dist's homebrew installer targeting fixture-dev/homebrew-tap, so macOS and Linux users can brew install fixture-dev/tap/lash.
dist 0.28.5+ generates persist-credentials: false on the tap checkout, but the job's final git push needs them. Flip that one line and document it.
dist plan rejects hand-edits to the generated workflow, and allow-dirty would disable that drift check entirely. Publish via ./.github/workflows/homebrew-tap.yml.
dist's caller job grants only id-token and packages, so requesting contents: read exceeded the grant and failed the run at startup.
This was referenced Aug 8, 2026
Merged
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.
Adds
brew install fixture-dev/tap/lashfor macOS and Linux.What this does
Turns on cargo-dist's Homebrew installer rather than hand-maintaining a formula.
The generated
lash.rbpoints at the prebuilt release tarballs for both macOSarches and both Linux arches, so
brew installdownloads a binary instead ofcompiling, and Linuxbrew works for free. A
publish-homebrew-formulajob commitsthe formula to fixture-dev/homebrew-tap
on each release; nothing needs doing per release.
Changes
dist-workspace.toml:homebrewadded toinstallers, plustapandpublish-jobs.github/workflows/release.yml: regenerated withdist generateCargo.toml/lash-cli: addedhomepage(the Homebrew installer warns without it),and replaced the self-referential crate description, which becomes the formula's
descand shows up inbrew infoREADME.md: install section, plus a note that mixing install methods puts twolashbinaries on PATH (~/.cargo/binvs the brew prefix)CONTRIBUTING.md: tap setup, token-expiry troubleshooting, and the hand-patch belowOne hand-patch in the generated workflow
dist 0.28.5+ emits
persist-credentials: falseon the tap checkout, but the jobends in a bare
git pushthat needs those credentials, so it fails withcould not read Username for 'https://github.com/'. That'sastral-sh/cargo-dist#29,
still unfixed upstream. One line is flipped to
true, markedLOCAL PATCHin thefile and documented in CONTRIBUTING —
dist generatesilently reverts it.Considered pinning dist back to 0.28.3 and owning the publish job via a custom
workflow; the patch won because losing it fails the job loudly rather than
shipping a stale formula.
Verification
dist build --artifacts=global, valid Ruby perruby -c, correct URLs for all four Unix targetsrelease.ymlparses; only the Homebrew checkout'spersist-credentialschangedactions/checkoutcannotcheck out a repo with no commits), and
HOMEBREW_TAP_TOKENis registeredThe publish job itself can only be proven by a real tagged release. If it fails it
does so after the GitHub Release is created, which is recoverable by fixing and
re-running the job without re-tagging.