From 5093ce9ec3417d7eafd3c311d9d3b30f1eab9735 Mon Sep 17 00:00:00 2001 From: John Mitsch Date: Mon, 15 Jun 2026 05:56:22 -0400 Subject: [PATCH] feat(release): publish canonical version-less .deb assets (DX-5703) GitHub's releases/latest/download/ redirect only resolves when the filename is identical across releases. The versioned .deb names (qn_X.Y.Z_arm64.deb) gave users no stable URL to point at. The release job now uploads a version-less copy (qn_amd64.deb, qn_arm64.deb) alongside each versioned file. The version lives in the package's control metadata, so apt/dpkg install the correct version regardless of filename. README's .deb section now uses the canonical latest-download URLs; versioned files stay attached for pinning. --- .github/workflows/publish-deb.yml | 15 +++++++++++++-- README.md | 14 ++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-deb.yml b/.github/workflows/publish-deb.yml index 5cc07ea..bc5c370 100644 --- a/.github/workflows/publish-deb.yml +++ b/.github/workflows/publish-deb.yml @@ -6,8 +6,14 @@ name: Publish Debian packages # Packages the prebuilt linux-gnu binaries from the GitHub release # into .deb files (amd64 + arm64) and uploads each as a release asset. # -# v1 ships .deb files attached to releases — users install via -# `dpkg -i ./qn_X.Y.Z_amd64.deb` or `apt install ./qn_X.Y.Z_amd64.deb`. +# Each arch is uploaded under two names: a versioned one +# (`qn_X.Y.Z_amd64.deb`) for pinning/archival, and a version-less one +# (`qn_amd64.deb`) that gives a stable canonical URL via GitHub's +# `releases/latest/download/` redirect. The version lives in the +# package's control metadata, so apt/dpkg install the right version +# regardless of the filename. +# +# Users install via `apt install ./qn_amd64.deb` (or the versioned file). # A hosted apt repo (aptly/reprepro + GPG) is out of scope. on: workflow_call: @@ -86,6 +92,10 @@ jobs: cargo deb --no-build --no-strip \ --target ${{ matrix.rust_target }} \ --output qn_${{ steps.meta.outputs.version }}_${{ matrix.deb_arch }}.deb + # Canonical copy with a version-less name, so + # releases/latest/download/qn_.deb stays a stable URL. + cp qn_${{ steps.meta.outputs.version }}_${{ matrix.deb_arch }}.deb \ + qn_${{ matrix.deb_arch }}.deb - name: Upload .deb to release env: @@ -93,4 +103,5 @@ jobs: run: | gh release upload "${{ steps.meta.outputs.tag }}" \ qn_${{ steps.meta.outputs.version }}_${{ matrix.deb_arch }}.deb \ + qn_${{ matrix.deb_arch }}.deb \ --clobber diff --git a/README.md b/README.md index 8b2b898..06d09fd 100644 --- a/README.md +++ b/README.md @@ -46,14 +46,20 @@ scoop install quicknode/qn ### `.deb` (Debian, Ubuntu) -Each GitHub release attaches `qn__amd64.deb` and `qn__arm64.deb`. Check your architecture with `dpkg --print-architecture`, then grab the matching file from the [latest release page](https://github.com/quicknode/cli/releases/latest): +Each GitHub release attaches a `.deb` per architecture. These canonical URLs always point at the latest release — check your architecture with `dpkg --print-architecture` and pick the matching one: ```sh -# replace with the version on the release page, e.g. 0.1.8 -curl -LO https://github.com/quicknode/cli/releases/download/v/qn__amd64.deb -sudo apt install ./qn__amd64.deb +# amd64 (Intel/AMD) +curl -LO https://github.com/quicknode/cli/releases/latest/download/qn_amd64.deb +sudo apt install ./qn_amd64.deb + +# arm64 +curl -LO https://github.com/quicknode/cli/releases/latest/download/qn_arm64.deb +sudo apt install ./qn_arm64.deb ``` +Versioned files (`qn__amd64.deb`) are also attached to each release for pinning. + ### Arch Linux (AUR) ```sh