From 6381e591128a6fb403ad0710d7a932f64e3ca95f Mon Sep 17 00:00:00 2001 From: Justin Shih Date: Wed, 28 Sep 2022 15:14:57 -0700 Subject: [PATCH] fix: move commit message into env variable --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25c252efc..b895e71fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,10 @@ jobs: node-version: lts/* - name: Get Version Number id: get-version-number + env: + COMMIT_MESSAGE: ${{github.event.head_commit.message}} run: | - version_number=$(echo "${{github.event.head_commit.message}}" | sed -n "s/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p") + version_number=$(echo "$COMMIT_MESSAGE" | sed -n "s/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p") echo "::set-output name=version_number::$version_number" - name: Get Release Description run: npx -y changelog-parser CHANGELOG.md | jq -r '.versions[0].body' > release_description.md