From 1306e3d5fb7da0a6845fae2963198e33bf53080e Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Wed, 12 May 2021 13:01:30 -0500 Subject: [PATCH] fix the string to one liner (#1557) --- .github/workflows/deploy-RELEASE.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-RELEASE.yml b/.github/workflows/deploy-RELEASE.yml index 02be4bab..82cabbac 100644 --- a/.github/workflows/deploy-RELEASE.yml +++ b/.github/workflows/deploy-RELEASE.yml @@ -151,14 +151,15 @@ jobs: if: success() id: create_release run: | - curl -X POST \ + UPDATED_BODY_STRING=$(echo "${{ github.event.issue.body }}" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g') + curl --fail -X POST \ --url https://api.github.com/repos/${{ github.repository }}/releases \ -H 'Accept: application/vnd.github.v3+json' \ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H 'Content-Type: application/json' \ --data "{ \"tag_name\": \"${{ env.RELEASE_VERSION }}\", \"target_commitish\": \"${{ env.PR_REF }}\", \ \"name\": \"Release ${{ env.RELEASE_VERSION }}\", \"draft\": false, \"prerelease\": false, \ - \"body\": \"${{ github.event.issue.body }}\" \ + \"body\": \"${UPDATED_BODY_STRING}\" \ \"repository_action_release_attributes\": { \"published_on_marketplace\": true }}" #####################################################