Closed sschuberth closed 1 year ago
Use the steps.changelog.outputs.changes
output variable in a subsequent step if you need further processing.
I probably should have explained the use-case better for more background information: I'm trying to minimize the use of third-party actions for security (and maintenance) reasons. That's why I prefer to use the runner-provided gh
CLI tool to create GitHub releases over using an action like ncipollo/release-action. Now, gh release create --notes '${{ steps.changelog.outputs.changes }}'
does not work if there are characters in changes
that have a special meaning for the shell. And gh release create --notes-file CHANGELOG.md
does basically work, but contains the header. Hence the idea to also be able to omit the header from the file.
Then add a shell step to write it to a file?
echo "${{ steps.changelog.outputs.changes }}" > CHANGELOG.md
The goal of CHANGELOG.md is to append to an existing file over time. You're using this file as a temporary step to create a release, which is really not the purpose of CHANGELOG.md.
Then add a shell step to write it to a file?
That has the same escaping-of-special-chars issue as gh release create --notes '${{ steps.changelog.outputs.changes }}'
.
You're using this file as a temporary step to create a release, which is really not the purpose of CHANGELOG.md.
Ok, understood.
For some scenarios it might be more convenient to have the action's output available in a file for further processing / upload. As such it would be nice if the version / date header could also be omitted when writing the
CHANGELOG.md
file.