ci: use ASCII release-body so Windows curl create succeeds

Git Bash on Windows mangles the UTF-8 em-dash in the create-release JSON payload,
so Gitea rejects it (422) whenever Windows is the job that creates the release.
Replace the em-dash with a plain hyphen so both platforms can create it.
This commit is contained in:
2026-09-01 13:05:47 +08:00
parent 37e6638854
commit ded19bbe18
+2 -2
View File
@@ -142,7 +142,7 @@ jobs:
REL_ID=$(curl -fsS -H "$AUTH" "${API}/releases/tags/${TAG}" \ REL_ID=$(curl -fsS -H "$AUTH" "${API}/releases/tags/${TAG}" \
| grep -o '"id":[0-9]*' | head -1 | cut -d: -f2 || true) | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2 || true)
if [ -z "$REL_ID" ]; then if [ -z "$REL_ID" ]; then
BODY="Gridline ${TAG#v} — Linux and Windows installers." BODY="Gridline ${TAG#v} - Linux and Windows installers."
REL_ID=$(curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \ REL_ID=$(curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"Gridline ${TAG#v}\",\"body\":\"${BODY}\",\"draft\":true}" \ -d "{\"tag_name\":\"${TAG}\",\"name\":\"Gridline ${TAG#v}\",\"body\":\"${BODY}\",\"draft\":true}" \
"${API}/releases" \ "${API}/releases" \
@@ -259,7 +259,7 @@ jobs:
REL_ID=$(curl -fsS -H "$AUTH" "${API}/releases/tags/${TAG}" \ REL_ID=$(curl -fsS -H "$AUTH" "${API}/releases/tags/${TAG}" \
| grep -o '"id":[0-9]*' | head -1 | cut -d: -f2 || true) | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2 || true)
if [ -z "$REL_ID" ]; then if [ -z "$REL_ID" ]; then
BODY="Gridline ${TAG#v} — Linux and Windows installers." BODY="Gridline ${TAG#v} - Linux and Windows installers."
REL_ID=$(curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \ REL_ID=$(curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"Gridline ${TAG#v}\",\"body\":\"${BODY}\",\"draft\":true}" \ -d "{\"tag_name\":\"${TAG}\",\"name\":\"Gridline ${TAG#v}\",\"body\":\"${BODY}\",\"draft\":true}" \
"${API}/releases" \ "${API}/releases" \