github-release icon indicating copy to clipboard operation
github-release copied to clipboard

Escape newlines in "body" not work as intended

Open KorewaLidesu opened this issue 3 years ago • 1 comments

I don't know how to describe it so... Action file image

KorewaLidesu avatar Jul 04 '21 13:07 KorewaLidesu

Hi, here is what I did. Might be a bit clunky but works for me:

value=$(cat body.txt)
value="${value//'%'/'%25'}"
value="${value//$'\n'/'%0A'}"
value="${value//$'\r'/'%0D'}"
echo "::set-output name=BODY::$value"

stm2 avatar Aug 22 '21 22:08 stm2