chore: sync .mokogitea/workflows/auto-release.yml from moko-platform [skip ci]

This commit is contained in:
2026-05-30 03:41:41 +00:00
parent fb74521468
commit 5d1e2bb884
+2 -2
View File
@@ -411,13 +411,13 @@ jobs:
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
SHA256="${{ steps.package.outputs.sha256_zip }}"
# Fetch latest updates.xml from main so preserve logic has all channels
# Fetch latest updates.xml from main so preserve logic has current channels
GITEA_TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}"
curl -sf -H "Authorization: token ${GITEA_TOKEN}" \
"${API}/contents/updates.xml?ref=main" 2>/dev/null | \
php -r "\$d=json_decode(file_get_contents('php://stdin'),true); echo base64_decode(\$d['content'] ?? '');" \
> updates.xml 2>/dev/null || true
> updates.xml 2>/dev/null || rm -f updates.xml
SHA_FLAG=""
[ -n "$SHA256" ] && SHA_FLAG="--sha ${SHA256}"