Skip to content

Commit 56b4f4e

Browse files
authored
Use the multi-line $GITHUB_OUTPUT syntax for the changelog entry output (#692)
The changelog entry is multi-line, so we need to use the multi-line syntax when using the `$GITHUB_OUTPUT` file. This resolves: ``` Error: Unable to process file command 'output' successfully. Error: Invalid format '### Added' ``` See: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings GUS-W-14177169.
1 parent 95204ad commit 56b4f4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ jobs:
4949
5050
- name: Extract changelog entry
5151
id: changelog-entry
52-
run: echo "content=$(awk '/^## \[${{ steps.new-version.outputs.version }}\]/{flag=1; next} /^## /{flag=0} flag' CHANGELOG.md)" >> "${GITHUB_OUTPUT}"
52+
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
53+
run: |
54+
{
55+
echo 'content<<CHANGELOG_END'
56+
awk '/^## \[${{ steps.new-version.outputs.version }}\]/{flag=1; next} /^## /{flag=0} flag' CHANGELOG.md
57+
echo CHANGELOG_END
58+
} >> "${GITHUB_OUTPUT}"
5359
5460
- name: Publish to crates.io
5561
# cargo-release calculates the dependency graph for us, and also skips any already

0 commit comments

Comments
 (0)