Skip to content

Commit

Permalink
Chore: escape quotes in release action (#2236)
Browse files Browse the repository at this point in the history
Use printf

Use a heredoc

Use jq
  • Loading branch information
katspaugh authored Jul 5, 2023
1 parent 9809612 commit a409dfc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

0 comments on commit a409dfc

Please sign in to comment.