From 9817cc04c7271055cf495e3e80fd93fe7cc56d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar?= Date: Mon, 11 Jan 2021 16:47:29 +0100 Subject: [PATCH] Escape 'Get commit message' step output in 'Publish' workflow (#4707) * Escape 'Get commit message' step output in 'Publish' workflow --- .github/workflows/publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7a18280f..d3b82310 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,9 +47,10 @@ jobs: - name: Get release title and body id: release run: | - RELEASE_TITLE=$(echo '${{ steps.commit.outputs.git-message }}' | head -n 1) + COMMIT_MSG="$(echo "${{ steps.commit.outputs.git-message }}")" + RELEASE_TITLE="$(echo "$COMMIT_MSG" | head -n 1)" echo "::set-output name=title::$RELEASE_TITLE" - RELEASE_BODY=$(echo '${{ steps.commit.outputs.git-message }}' | tail -n $(expr $(echo '${{ steps.commit.outputs.git-message }}' | wc -l) - 1)) + RELEASE_BODY="$(echo "$COMMIT_MSG" | tail -n +3)" echo "::set-output name=body::$RELEASE_BODY" - name: Get release version id: get-version