From a4f09533533566e6c0bc7d3b87099a229acd10cd Mon Sep 17 00:00:00 2001 From: John Coffey Date: Sun, 20 Sep 2026 20:58:45 -0700 Subject: [PATCH] Give releases a stable latest-download URL The install guide tells people to curl .../releases/latest/download/ which is a GitHub URL shape. GitLab's equivalent is /-/releases/permalink/latest/downloads/ but it only resolves for assets that declare direct_asset_path, and the release job was creating plain links to the package registry. Those carry the tag in the URL, so they can never be a "latest" link. Each asset now also declares /binaries/, which is what the docs will point at. The path is load-bearing: changing it breaks a documented install command. --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1a4863..130eadb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,7 +100,14 @@ release: args="" for f in dist/*; do n=$(basename "$f") - args="$args --assets-link {\"name\":\"${n}\",\"url\":\"${PKG}/${CI_COMMIT_TAG}/${n}\"}" + # direct_asset_path is what makes the permalink work. Without it the + # only stable URL is the package registry one, which carries the tag + # and so cannot be a "latest" link. With it, every release exposes + # /-/releases/permalink/latest/downloads/binaries/ + # which is the GitLab equivalent of the GitHub + # /releases/latest/download/ URL the install guide has always + # used. Changing this path breaks documented install commands. + args="$args --assets-link {\"name\":\"${n}\",\"url\":\"${PKG}/${CI_COMMIT_TAG}/${n}\",\"direct_asset_path\":\"/binaries/${n}\"}" done # shellcheck disable=SC2086 release-cli create --name "$CI_COMMIT_TAG" --tag-name "$CI_COMMIT_TAG" \