Release darwin binaries and tarballs - #35
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the release pipeline to build and publish macOS (darwin) binaries alongside Linux assets, and adds plain .tar.gz archives for tool-manager-friendly installs (e.g., mise) in addition to existing .deb/.rpm Linux packages.
Changes:
- Expand the release build matrix to include
darwinand producequickhook-<version>-<os>-<arch>.tar.gzfor each OS/arch pair. - Repair GitHub Actions workflow compatibility by upgrading retired actions and adjusting artifact naming/downloading for
upload-artifact@v4. - Update README install instructions to reflect new asset naming and add mise-based installation guidance.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates install docs for new tarball assets and platform-agnostic “Binary downloads” section. |
| .github/workflows/release.yml | Renames build job, updates dependencies, and adds an (optional) draft-release publish job. |
| .github/workflows/release-build.yml | Adds darwin to the build matrix, produces tarballs, and migrates artifact upload to v4 with per-matrix names. |
| .github/workflows/release-verify-deb-ubuntu.yml | Updates artifact download to match new artifact naming/patterns. |
| .github/workflows/release-verify-rpm-rhel.yml | Updates artifact download to match new artifact naming/patterns. |
Comments suppressed due to low confidence (2)
README.md:76
- Consider using
curlinstead ofwgetin the.debdownload example as well, so the docs work on minimal systems wherewgetis not installed by default.
# Installing a .deb
wget https://github.com/dirk/quickhook/releases/download/v1.6.2/quickhook-1.6.2-linux-amd64.deb
sudo apt install ./quickhook-1.6.2-linux-amd64.deb
README.md:80
- Consider using
curlinstead ofwgetin the.rpmdownload example as well, so the docs work on minimal systems wherewgetis not installed by default.
# Installing a .rpm
wget https://github.com/dirk/quickhook/releases/download/v1.6.2/quickhook-1.6.2-linux-amd64.rpm
sudo rpm --install quickhook-1.6.2-linux-amd64.rpm
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Finishes the darwin stub that's been commented out in release-build.yml since 2023 (9e39eaa). The deb/rpm packaging steps were already gated on matrix.os == 'linux', so adding darwin to the matrix just works: every os/arch pair now also produces quickhook-<version>-<os>-<arch>.tar.gz with the binary at the archive root, where tool managers like mise's github backend expect to find it. Linux tarballs also give bare-binary installs a path that doesn't require dpkg/rpm. Also repairs the pipeline: upload-artifact@v3 was retired in January 2025, so release runs have been failing on the upload side (dependabot only bumped the download half). v4 artifacts are immutable per name, so each matrix job uploads under release-<os>-<arch> and the two verify workflows download with pattern: release-linux-* + merge-multiple, which reproduces the old single-artifact layout they expect. README: the Linux section becomes Binary downloads, with the stale v1.5.0 pre-'linux'-naming URLs fixed and tarball + mise instructions added.
Assets have been uploaded to releases by hand, which is likely why darwin binaries never shipped. A publish job (gated to main so test dispatches only build and verify) downloads every release-* artifact and drafts the GitHub release with --generate-notes and all assets attached — publishing the draft stays a human step. Severable from the darwin/tarball commit if hand-rolled uploads are preferred.
0eaf423 to
182ba12
Compare
The Binary downloads examples reference v1.6.2 for copy-pasteability, but that release predates tarball assets — say so instead of implying the darwin tarball URL resolves today.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
README.md:72
- The README says tarballs ship starting with the first release after v1.6.2, but the tarball example URL points at the v1.6.2 tag. Since this workflow only drafts/releases assets for the newly-created tag, v1.6.2 will never gain a darwin tarball, so the example will remain broken/misleading.
# Installing a tarball (the binary sits at the archive root)
curl -LO https://github.com/dirk/quickhook/releases/download/v1.6.2/quickhook-1.6.2-darwin-arm64.tar.gz
tar -xzf quickhook-1.6.2-darwin-arm64.tar.gz quickhook # then move it onto your $PATH
Tarballs ship starting with the first release after v1.6.2, so a v1.6.2-pinned tarball URL would never resolve. The deb/rpm examples keep v1.6.2 — those assets exist today.
|
Fixed — the tarball example now uses a |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
.github/workflows/release-build.yml:63
- The new tarball assets aren’t validated during the build. A malformed archive (wrong path inside the tarball, missing executable bit, wrong binary type, etc.) would still upload successfully and only be discovered after release. Consider adding a quick sanity check here to ensure the tarball contains a single
quickhookentry at the archive root, and that the extracted binary at least reports the expected version on Linux (and looks like a Mach-O for darwin).
- name: Package tarballs
run: |
tar -czf quickhook-${{ inputs.version }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz -C build/usr/bin quickhook
.github/workflows/release.yml:60
- The publish step relies on bare globs (
*.deb *.rpm *.tar.gz) and unvalidated user input when constructing the release. If any glob unexpectedly matches nothing (or the version contains whitespace/shell metacharacters),gh release createcan fail in a non-obvious way. Consider enablingnullglob, validating the version string, and passing an explicit file list togh.
gh release create "v${{ needs.version.outputs.version }}" \
--repo "${{ github.repository }}" \
--draft \
--generate-notes \
*.deb *.rpm *.tar.gz
|
YAGNI. Went another route internally. |
Closes #32.
This finishes the darwin stub that's been commented out in
release-build.ymlsince 9e39eaa (2023) — the deb/rpm steps were alreadyif: matrix.os == 'linux'-guarded, so darwin slots straight into the matrix.What
Commit 1 — darwin + tarballs + pipeline repair:
os: [linux, darwin]in the build matrix; every os/arch pair now also producesquickhook-<version>-<os>-<arch>.tar.gzwith the binary at the archive root (where tool managers like mise's github backend expect it —mise use github:dirk/quickhookresolves these with no overrides, and archives outrank the .deb in its asset scoring). Linux tarballs also give bare-binary installs a path that doesn't need dpkg/rpm.upload-artifact@v3(retired Jan 2025; dependabot only bumped the download half) →v4with per-matrixname: release-<os>-<arch>(v4 artifacts are immutable per name), verify workflows download withpattern: release-linux-*+merge-multiple: true.setup-go@v3→v7andruby/setup-ruby@v1.146.0→v1(the v3 runner detection hard-fails on current images).linux-naming URLs, adds tarball + mise instructions. (Tarball URLs will resolve from the next release onward.)build-linux→buildsince it's no longer linux-only.Commit 2 — severable if you'd rather keep hand-rolled uploads: a
publishjob inrelease.yml(needs both verifies,contents: write) that downloads allrelease-*artifacts and drafts the GitHub release with--generate-notesand every asset attached — publishing the draft stays a human step. Gated to main, so test dispatches only build and verify.Evidence
Dispatched
release.ymlon this branch with a throwaway version (v1.6.2.test3, at the current head): https://github.com/dirk/quickhook/actions/runs/30329291457 — all four build jobs and both verifies green, publish skipped (off-main as designed). Downloaded the artifacts:quickhook-<version>-darwin-arm64.tar.gzcontains a Mach-O 64-bit arm64 executable at the archive root that runs on my Mac and reports the test version; linux artifacts carry .deb, .rpm, and .tar.gz each.(Unrelated, deliberately not touched: go-install builds report
--versionas "main" since VERSION is sed-rewritten only at release build.)