From 7c818cfb34e066e8b6f65803be394f97cb7ca338 Mon Sep 17 00:00:00 2001 From: classabbyamp <5366828+classabbyamp@users.noreply.github.com> Date: Tue, 6 Oct 2020 22:58:20 -0400 Subject: [PATCH 1/2] fix tag bug in release workflow progress on #275 --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b04b992..250ad30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,13 +30,14 @@ jobs: echo ::set-output name=subject::${SUBJECT} echo ::set-output name=body::${BODY} - echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} + echo ::set-output name=version_tag::${GITHUB_REF#refs/tags/} + echo ::set-output name=version::${GITHUB_REF#refs/tags/v} - name: Get Changelog Content id: changelog_reader uses: mindsers/changelog-reader-action@v2 with: - version: ${{ steps.get_tag.outputs.current_version }} + version: ${{ steps.get_tag.outputs.version }} path: ./CHANGELOG.md - name: Publish Release @@ -45,7 +46,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.changelog_reader.outputs.version }} + tag_name: ${{ steps.get_tag.outputs.version_tag }} release_name: ${{ steps.get_tag.outputs.subject }} body: | ${{ steps.get_tag.outputs.body }} From 0f0c3bf72326c6a6bbcfa39728d49f1ccf8037ee Mon Sep 17 00:00:00 2001 From: classabbyamp <5366828+classabbyamp@users.noreply.github.com> Date: Tue, 6 Oct 2020 23:44:58 -0400 Subject: [PATCH 2/2] fix variables not working correctly Fixes #275 --- .github/workflows/release.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 250ad30..3089c7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,19 +25,23 @@ jobs: SUBJECT=$(/usr/bin/git tag -l ${GITHUB_REF#refs/tags/} --format='%(subject)') BODY=$(/usr/bin/git tag -l ${GITHUB_REF#refs/tags/} --format='%(body)' | sed '/-----BEGIN PGP SIGNATURE-----/,$d') - echo SUBJECT=$SUBJECT - echo BODY=$BODY + echo "SUBJECT=$SUBJECT" + echo "BODY=$BODY" - echo ::set-output name=subject::${SUBJECT} - echo ::set-output name=body::${BODY} - echo ::set-output name=version_tag::${GITHUB_REF#refs/tags/} - echo ::set-output name=version::${GITHUB_REF#refs/tags/v} + echo 'tag_subject<> $GITHUB_ENV + echo "$SUBJECT" >> $GITHUB_ENV + echo 'EOS' >> $GITHUB_ENV + echo 'tag_body<> $GITHUB_ENV + echo "$BODY" >> $GITHUB_ENV + echo 'EOB' >> $GITHUB_ENV + echo "tag_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "version_num=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV - name: Get Changelog Content id: changelog_reader uses: mindsers/changelog-reader-action@v2 with: - version: ${{ steps.get_tag.outputs.version }} + version: ${{ env.version_num }} path: ./CHANGELOG.md - name: Publish Release @@ -46,14 +50,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.get_tag.outputs.version_tag }} - release_name: ${{ steps.get_tag.outputs.subject }} + tag_name: ${{ env.tag_version }} + release_name: ${{ env.tag_subject }} body: | - ${{ steps.get_tag.outputs.body }} + ${{ env.tag_body }} ## Changelog ${{ steps.changelog_reader.outputs.changes }} draft: false prerelease: false -