fix the string to one liner (#1557)

This commit is contained in:
Lukas Gravley 2021-05-12 13:01:30 -05:00 committed by GitHub
parent 34b2f8032d
commit 1306e3d5fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,14 +151,15 @@ jobs:
if: success() if: success()
id: create_release id: create_release
run: | 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 \ --url https://api.github.com/repos/${{ github.repository }}/releases \
-H 'Accept: application/vnd.github.v3+json' \ -H 'Accept: application/vnd.github.v3+json' \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
--data "{ \"tag_name\": \"${{ env.RELEASE_VERSION }}\", \"target_commitish\": \"${{ env.PR_REF }}\", \ --data "{ \"tag_name\": \"${{ env.RELEASE_VERSION }}\", \"target_commitish\": \"${{ env.PR_REF }}\", \
\"name\": \"Release ${{ env.RELEASE_VERSION }}\", \"draft\": false, \"prerelease\": false, \ \"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 }}" \"repository_action_release_attributes\": { \"published_on_marketplace\": true }}"
##################################################### #####################################################