Add Homebrew tap recipe and Debian .deb packaging#5
Merged
Merged
Add Homebrew tap recipe and Debian .deb packaging#5
Conversation
cargo-dist generates qn.rb as a release artifact regardless of whether the "homebrew" entry is in publish-jobs. Until we have a HOMEBREW_TAP_TOKEN secret (which needs a Quicknode-owned PAT we don't yet have), the auto-push step stays disabled and this Justfile recipe lets a maintainer manually sync the formula to a local clone of quicknode/homebrew-tap. Usage: just release-update-homebrew-tap 0.1.0 ~/qn/homebrew-tap The recipe downloads qn.rb from the release, drops it at Formula/qn.rb in the tap clone, commits with a clean message, and prints the git push command (it does not push automatically — the maintainer reviews and pushes themselves). When HOMEBREW_TAP_TOKEN exists we'll add "homebrew" back to publish-jobs in dist-workspace.toml, the cargo-dist publish-homebrew job takes over, and this recipe becomes a fallback for manual recovery.
The Quicknode tap at quicknode/homebrew-tap is populated with the v0.1.0 formula (via release-update-homebrew-tap), so `brew install quicknode/tap/qn` works for anyone with access to the tap repo. Also add the crates.io path and fix the source-build remote (which still pointed at the never-created quicknode/qn instead of quicknode/cli). Drop the trailing "after pushing, paste this README snippet" hint from the release-update-homebrew-tap recipe — the README is now updated and the hint would just rot.
Adds Debian package builds to the cargo-dist release pipeline: * [package.metadata.deb] in Cargo.toml configures cargo-deb to produce qn_X.Y.Z_<arch>.deb files (using the binary name in the filename, not the crate name). * .github/workflows/publish-deb.yml is a reusable workflow that, per arch (amd64/arm64), downloads the prebuilt linux-gnu archive from the GitHub release, stages the binary where cargo-deb expects it, packages with --no-build --no-strip, and uploads the .deb back to the release as an asset. * dist-workspace.toml gets ./publish-deb in publish-jobs and contents: write in github-custom-job-permissions (needed for `gh release upload`). Hosted apt repo (aptly/reprepro + GPG signing) is out of scope for v1. Users install via `dpkg -i ./qn_X.Y.Z_amd64.deb` or `apt install ./qn_X.Y.Z_amd64.deb` after downloading from the release page. Also brings this branch's publish-crates.yml and publish-docker.yml in line with the post-v0.1.0 fixes that landed on main: * publish-crates.yml gains `permissions: contents: read` so its reusable-workflow GITHUB_TOKEN can actually checkout this internal repo (without it, actions/checkout gets a 404). * publish-docker.yml drops `attestations: write` from its top-level permissions — that grant exceeded what the caller offered and was the original cause of the v0.1.0 startup_failure. * The release.yml regeneration also drops the homebrew publish job (no HOMEBREW_TAP_TOKEN yet — we publish manually via `just release-update-homebrew-tap`). Validated locally: cargo deb produced a structurally valid .deb with the right control metadata and /usr/bin/qn + /usr/share/doc/qn/ layout.
# Conflicts: # .github/workflows/publish-docker.yml # .github/workflows/release.yml # README.md # dist-workspace.toml
markwu35
approved these changes
Jun 5, 2026
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
Builds on the cargo-dist release pipeline merged via #1, adding two more channels for the next release:
Homebrew (manual): a Justfile recipe (
release-update-homebrew-tap) downloads the cargo-dist-generated formula from a release and stages it in a local clone ofquicknode/homebrew-tap. README documentsbrew install quicknode/tap/qn.Debian
.deb: a new reusable workflow (publish-deb.yml) is wired into the cargo-dist publish pipeline. On each release it downloads the prebuilt linux-gnu binary per arch, packages it withcargo-deb --no-build, and uploadsqn_X.Y.Z_amd64.debandqn_X.Y.Z_arm64.debback to the GitHub Release as assets. Users install withdpkg -i ./qn_X.Y.Z_amd64.deborapt install ./qn_X.Y.Z_amd64.deb. A hosted apt repo is out of scope for v1.Also brings this branch's two publish workflows (
publish-crates.yml,publish-docker.yml) in line with the post-v0.1.0 fixes that landed onmainseparately — thecontents: readgrant onpublish-cratesand the trimmedattestations: writeonpublish-dockerthat fixed the original startup_failure.What ships at the next release
qn_X.Y.Z_amd64.debandqn_X.Y.Z_arm64.debattached to the Release page.Test plan
cargo fmt --check,cargo clippy -D warnings,cargo test --allall green locally on this branch.dist planexits 0 (the cargo-dist "is the workflow up to date?" check passes).cargo deb --no-build --no-stripvalidated locally: produces a structurally valid .deb with the right control metadata (Package: qn,Version: 0.1.0-1) and file layout (/usr/bin/qn,/usr/share/doc/qn/{README,LICENSE,copyright}).quicknode/homebrew-tapv0.1.0 — formula landed cleanly.release.ymlplan job runs green (verifiesdist planin CI as well as locally).custom-publish-debjob succeeds in CI and the.debfiles appear on the release page.🤖 Generated with Claude Code