From 56b4f4ef66be29576e29595e31de01d502f0cfaf Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:02:21 +0000 Subject: [PATCH] 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. --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e1ff879..6e7194ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,13 @@ jobs: - name: Extract changelog entry id: changelog-entry - run: echo "content=$(awk '/^## \[${{ steps.new-version.outputs.version }}\]/{flag=1; next} /^## /{flag=0} flag' CHANGELOG.md)" >> "${GITHUB_OUTPUT}" + # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings + run: | + { + echo 'content<> "${GITHUB_OUTPUT}" - name: Publish to crates.io # cargo-release calculates the dependency graph for us, and also skips any already