markdown-extract
markdown-extract copied to clipboard
Action sample workflow breaks if markdown contains an apostrophe
This step in the sample workflow:
- name: Write output to file
run: |
printf '${{ steps.extract-changelog.outputs.markdown }}' > CHANGELOG-extracted.txt
will break if there is an apostrophe in the extracted markdown content.
Here's an example:
https://github.com/jayqi/gha-python-package-release-demo/actions/runs/13342379809/job/37268650798
with this markdown document.
I was able to do it correctly by using heredoc to dump the content into a file instead.
https://github.com/jayqi/gha-python-package-release-demo/blob/69c2db55b56a2a4eee1bf82467b87f47897c7bc9/.github/workflows/release.yml#L53-L57
Thanks for your example jayqi, it helped me!