From 7770abab6fa253acdc75b091ec7f4e7e6c5886b2 Mon Sep 17 00:00:00 2001 From: Alexander Renz Date: Wed, 7 Jan 2026 12:45:03 +0100 Subject: [PATCH] ci: fix JSON escaping in release creation --- .gitea/workflows/ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 20f81cb..c47e0e6 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -113,11 +113,22 @@ jobs: echo "Creating Gitea release for ${TAG}..." + # Create JSON payload (avoid shell escaping issues) + cat > /tmp/release.json << EOF + { + "tag_name": "${TAG}", + "name": "${TAG}", + "body": "## Download\n\nSelect the binary for your platform.\n\n### Platforms\n- Linux (amd64, arm64)\n- macOS (Intel, Apple Silicon)\n- FreeBSD (amd64)", + "draft": false, + "prerelease": false + } + EOF + # Create release via API RESPONSE=$(curl -s -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ - -d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":\"## Download\\n\\nSelect the binary for your platform.\\n\\n### Platforms\\n- Linux (amd64, arm64)\\n- macOS (Intel, Apple Silicon)\\n- FreeBSD (amd64)\",\"draft\":false,\"prerelease\":false}" \ + -d @/tmp/release.json \ "https://git.uuxo.net/api/v1/repos/${GITHUB_REPOSITORY}/releases") RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')