You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 4, 2021. It is now read-only.
But when passing body: ${{ env.CHANGELOG }} to actions/create-release, the created release shows ascii \n characters instead of newlines. Would it be possible to process escape characters in the body the same way echo -e does? If this isn't desired as default behaviour, could an input be added to specify this?
Thanks :)
Reacted by Alex Williams, everdrone, Milad Nazari and Evgeny
So my script generates a table of metrics for my bachelor thesis:
Relevant code
defprint_result(analysis_result: Dict[str, Any]) ->None:
data=sorted([(k, v) fork, vinanalysis_result.items()])
to_print="### Metrics\n"+tabulate.tabulate(data, tablefmt="github")
# use newline char for url encoding instead of standard one# to get multiline output shown in release bodyto_print=to_print.replace('\n', '%0A')
print(to_print)
Nevermind, the problem is that multiple continous whitespace characters are replaced by one in HTML (and thus Markdown rendering). So I ended up adding fenced code blocks characters.
Activity
walfie commentedon Nov 27, 2019
I found out that you can set outputs with newlines, if you replace newlines with the literal characters
%0Ae.g.,
echo "::set-output name=my_output::hello%0Aworld%0A!"Presumably also works with
::set-envalthough I haven't triedtrung commentedon Dec 6, 2019
Here is the workaround I'm using now:
And using
masterAdjust "\n" handling
nazarimilad commentedon Dec 27, 2019
So my script generates a table of metrics for my bachelor thesis:
Relevant code
Output (standard output)
'### Metrics%0A|------------|-----|%0A| citations | 3 |%0A| figures | 0 |%0A| pages | 30 |%0A| tables | 0 |%0A| word_count | 510 |'In the CI job console, the table is shown correctly:
However, in the release, the table becomes malformed like these:
Can someone help me out finding the problem here?
nazarimilad commentedon Dec 27, 2019
Nevermind, the problem is that multiple continous whitespace characters are replaced by one in HTML (and thus Markdown rendering). So I ended up adding fenced code blocks characters.
nathanielatom commentedon Jan 17, 2020
Thanks @walfie and @trung! I found that I had to tweak the search and replace a little, so I ended up with:
Also I can confirm it works with
::set-envas expected.fix(release): newline bug fix
fix(release): newline bug fix