From 263454db06081090b6bd66afc39030d0b7aec917 Mon Sep 17 00:00:00 2001 From: Viktor Erlingsson Date: Wed, 14 Jan 2026 17:04:56 +0100 Subject: [PATCH] Fix debian PackageCloud upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The commit c979e4c changed the build output directory structure from builds/ubuntu/jammy/*.deb to builds/linux_amd64/*.deb. The PackageCloud upload script was still trying to extract distribution info from the file path, resulting in empty DIST_ID values and 422 errors. This fix extracts the distribution ID and version codename from the matrix.os variable instead (e.g., "ubuntu-jammy" → "ubuntu" + "jammy"), matching the pattern already used successfully in the RPM section. --- .github/workflows/packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 6809170..1cbd556 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -88,11 +88,11 @@ jobs: run: | set -eux curl -fsSO -u "${{ secrets.PACKAGECLOUD_TOKEN }}:" https://packagecloud.io/api/v1/distributions.json + ID=$(echo "${{ matrix.os }}" | cut -d- -f1) + VERSION_CODENAME=$(echo "${{ matrix.os }}" | cut -d- -f2) + DIST_ID=$(jq ".deb[] | select(.index_name == \"${ID}\").versions[] | select(.index_name == \"${VERSION_CODENAME}\").id" distributions.json) for PKG_FILE in $(find builds -name "*.deb") do - ID=$(echo $PKG_FILE | cut -d/ -f3) - VERSION_CODENAME=$(echo $PKG_FILE | cut -d/ -f4) - DIST_ID=$(jq ".deb[] | select(.index_name == \"${ID}\").versions[] | select(.index_name == \"${VERSION_CODENAME}\").id" distributions.json) curl -fsS -u "${{ secrets.PACKAGECLOUD_TOKEN }}:" -XPOST \ -F "package[distro_version_id]=${DIST_ID}" \ -F "package[package_file]=@${PKG_FILE}" \