Multiline test for release

This commit is contained in:
Yair Morgenstern 2021-07-02 18:02:11 +03:00 committed by GitHub
parent 25785fd949
commit aff396523d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,13 +76,15 @@ jobs:
## To test this in Windows PS: cat .\changelog.md | wsl grep -Pzo --color '\\#{2}.3.15.7[^\\#]*?\\#{2}' | wsl head -n -2
r=$(grep -Pzo '\#{2}.${{steps.tag.outputs.tag}}[^\#]*\#' changelog.md) # grep to get only our release
echo "$r"
echo "------"
r=$(head -n -2 $r)
echo "--- after head ---"
r=$(echo "$r" | head -n -2)
echo "$r"
#r="${r//'%'/'%25'}" # Multiline escape sequences for %
#r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
#r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
echo "::set-output name=RELEASE_BODY::$r" # <--- Set environment variable
echo "--- reading from output ---"
echo "${{ steps.read_release.outputs.RELEASE_BODY }}"
- name: Post announcement on Discord
continue-on-error: true
@ -91,7 +93,7 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2
with:
args: '"${{ steps.read_release.outputs.RELEASE_BODY }}"'
args: "'${{ steps.read_release.outputs.RELEASE_BODY }}'"
- name: Upload binaries to release
@ -106,4 +108,4 @@ jobs:
# <--- Use environment variables that was created earlier - see https://github.com/svenstaro/upload-release-action
# Double-quotes so it will take the multiline, https://stackoverflow.com/questions/49457787
body: |
"${{ steps.read_release.outputs.RELEASE_BODY }}"
'${{ steps.read_release.outputs.RELEASE_BODY }}'