From 8530b1f09a8cbad7a42f92899e125a37ffab15ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl?= Date: Wed, 29 Jul 2026 23:08:03 +0200 Subject: [PATCH] ci: split desktop feed tarball under 2 GiB asset cap --- .github/workflows/build-healthchat-desktop.yaml | 12 ++++++++---- .github/workflows/deploy-healthchat-desktop.yaml | 13 ++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-healthchat-desktop.yaml b/.github/workflows/build-healthchat-desktop.yaml index 478faaae57..36a479ddf8 100644 --- a/.github/workflows/build-healthchat-desktop.yaml +++ b/.github/workflows/build-healthchat-desktop.yaml @@ -348,7 +348,11 @@ jobs: VERSION="${GITHUB_REF_NAME#healthchat-v}" TARBALL="healthchat-desktop-feed-${VERSION}.tar.gz" # Store paths relative to feed/ so the deploy side extracts a bare feed/ tree. - tar -czf "$TARBALL" feed - ls -lh "$TARBALL" - gh release upload "$TAG" "$TARBALL" --clobber - echo "::notice::Update feed attached as ${TARBALL}. The live feed at healthchat.ch is UNCHANGED — run the 'Deploy HealthChat Desktop' workflow to publish it." + # GitHub caps Release assets at 2 GiB and the compressed feed exceeds that + # (first hit by 1.6.0), so stream the tarball through split and attach the + # parts; the deploy workflow concatenates ${TARBALL}.part* in glob order + # before extracting. + tar -czf - feed | split -b 1536m -d - "${TARBALL}.part" + ls -lh "${TARBALL}".part* + gh release upload "$TAG" "${TARBALL}".part* --clobber + echo "::notice::Update feed attached as ${TARBALL}.part*. The live feed at packages.healthchat.ch is UNCHANGED — run the 'Deploy HealthChat Desktop' workflow to publish it." diff --git a/.github/workflows/deploy-healthchat-desktop.yaml b/.github/workflows/deploy-healthchat-desktop.yaml index 0e1dc7e85b..f0fdc60a6a 100644 --- a/.github/workflows/deploy-healthchat-desktop.yaml +++ b/.github/workflows/deploy-healthchat-desktop.yaml @@ -72,12 +72,19 @@ jobs: echo "::error::No GitHub Release found for tag $TAG" exit 1 fi - if ! gh release download "$TAG" --pattern "$TARBALL" --clobber; then - echo "::error::Release $TAG has no asset '$TARBALL'. Releases cut before the deploy split do not carry one — re-run 'Build HealthChat Desktop' for this version to produce it." + # The feed is attached as split ${TARBALL}.part* files (the compressed feed + # outgrew GitHub's 2 GiB per-asset cap at 1.6.0); older releases may carry a + # single-file tarball instead. Handle both. + if ! gh release download "$TAG" --pattern "${TARBALL}*" --clobber; then + echo "::error::Release $TAG has no asset matching '${TARBALL}*'. Releases cut before the deploy split do not carry one — re-run 'Build HealthChat Desktop' for this version to produce it." gh release view "$TAG" --json assets --jq '.assets[].name' || true exit 1 fi - tar -xzf "$TARBALL" + if compgen -G "${TARBALL}.part*" > /dev/null; then + cat "${TARBALL}".part* | tar -xzf - + else + tar -xzf "$TARBALL" + fi test -d feed || { echo "::error::Tarball did not contain a feed/ directory"; exit 1; } echo "--- feed to publish ---" find feed -type f | sort