From d9326ea34bb506dbcdbea76b22af0765f3f0a89c Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 25 May 2026 21:54:42 -0500 Subject: [PATCH] fix(ci): auto-release fetches updates.xml from main before building Preserves all existing channel entries (dev, alpha, beta, rc) when adding/updating the stable entry. Previously the file on disk was empty or stale, so the preserve logic had nothing to keep. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .mokogitea/workflows/auto-release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.mokogitea/workflows/auto-release.yml b/.mokogitea/workflows/auto-release.yml index 159e9e91..8bf99625 100644 --- a/.mokogitea/workflows/auto-release.yml +++ b/.mokogitea/workflows/auto-release.yml @@ -270,6 +270,15 @@ jobs: steps.platform.outputs.platform == 'joomla' run: | VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" + + # Fetch latest updates.xml from main so preserve logic has all channels + GA_TOKEN="${{ secrets.GA_TOKEN }}" + API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" + curl -sf -H "Authorization: token ${GA_TOKEN}" \ + "${API}/contents/updates.xml?ref=main" 2>/dev/null | \ + python3 -c "import sys,json,base64; print(base64.b64decode(json.load(sys.stdin)['content']).decode())" \ + > updates.xml 2>/dev/null || true + php /tmp/moko-platform-api/cli/updates_xml_build.php \ --path . --version "${VERSION}" --stability stable \ --gitea-url "${GITEA_URL}" --org "${GITEA_ORG}" --repo "${GITEA_REPO}" \