From af90d94c795eeb589259dc0dd32597e6337f44a1 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 22 Apr 2024 21:45:29 +0900 Subject: [PATCH] TEST: tesing main release on Gitea [skip ci] --- .github/workflows/main-gitea.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-gitea.yml b/.github/workflows/main-gitea.yml index deea0003..88a8c10e 100644 --- a/.github/workflows/main-gitea.yml +++ b/.github/workflows/main-gitea.yml @@ -139,13 +139,13 @@ jobs: TAG="${{ env.REL_VER }}" RELEASE_BODY="$(cat body.md)" - echo -e "[DEBUG] Release Body:\n$RELEASE_BODY" + escaped_body=$(echo "$RELEASE_BODY" | sed 's/[][\\.*^$]/\\&/g') # Create a release using curl and capture the release ID release_response=$(curl -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \ - -d "{\"tag_name\":\"$TAG\",\"name\":\"$RELEASE_NAME\",\"body\":"'"$RELEASE_BODY"'"}" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"$RELEASE_NAME\",\"body\":\"$escaped_body\"}" \ "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases") echo -e "[DEBUG] Release response:\n$release_response"