From a409dfcb5132e57e96b80d544d10573b7a3f242a Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Wed, 5 Jul 2023 18:09:51 +0200 Subject: [PATCH] Chore: escape quotes in release action (#2236) Use printf Use a heredoc Use jq --- .github/workflows/tag-release.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 2c6aeaa7c1..6e23c98452 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -11,8 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 if: github.event.pull_request.merged == true + uses: actions/checkout@v2 with: fetch-depth: 0 @@ -22,23 +22,20 @@ jobs: run: | NEW_VERSION=$(node -p 'require("./package.json").version') echo "version=v$NEW_VERSION" >> $GITHUB_OUTPUT - echo "${{ github.event.pull_request.body }}" > CHANGELOG.md - name: Create a git tag if: github.event.pull_request.merged == true - run: git tag $NEW_VERSION && git push --tags - env: - NEW_VERSION: ${{ steps.version.outputs.version }} + run: git tag ${{ steps.version.outputs.version }} && git push --tags - name: GitHub release if: success() - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v1 id: create_release with: draft: true prerelease: false - release_name: ${{ steps.version.outputs.version }} + name: ${{ steps.version.outputs.version }} tag_name: ${{ steps.version.outputs.version }} - body_path: CHANGELOG.md + body: ${{ github.event.pull_request.body }} env: GITHUB_TOKEN: ${{ github.token }}