From 12c615b62c7dbce13ce0b5cd63b73e23716bbdde Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sun, 15 Feb 2026 13:46:20 +0000 Subject: [PATCH] fix gitea workflow bug --- .gitea/workflows/release.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index e66d79b..b0397dd 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -95,6 +95,12 @@ jobs: # Get the tag message TAG_MESSAGE=$(git tag -l --format='%(contents)' ${VERSION}) + # Create release body + RELEASE_BODY=$(printf "%s\n\n## Downloads\n\n### Linux\n- **AppImage**: Portable, single-file executable (no installation needed)\n- **Tarball**: Extract and run \`sudo ./install.sh\` to install\n\n### Windows\n- **Zip**: Extract and run \`NotePad.exe\`" "$TAG_MESSAGE") + + # Escape the full body for JSON + RELEASE_BODY_JSON=$(printf '%s' "$RELEASE_BODY" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g') + # Create release curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases" \ -H "Authorization: token ${GITEA_TOKEN}" \ @@ -102,7 +108,7 @@ jobs: -d "{ \"tag_name\": \"${VERSION}\", \"name\": \"NotePad ${VERSION}\", - \"body\": \"${TAG_MESSAGE}\n\n## Downloads\n\n### Linux\n- **AppImage**: Portable, single-file executable (no installation needed)\n- **Tarball**: Extract and run \`sudo ./install.sh\` to install\n\n### Windows\n- **Zip**: Extract and run \`NotePad.exe\`\" + \"body\": \"${RELEASE_BODY_JSON}\" }" > release_response.json RELEASE_ID=$(cat release_response.json | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)