build: fix auto-release workflow
Escape special chars by using a cleaner approach
This commit is contained in:
@@ -23,8 +23,11 @@ jobs:
|
|||||||
run: echo "title=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT
|
run: echo "title=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Save PR body to file
|
- name: Save PR body to file
|
||||||
run: |
|
uses: actions/github-script@v6
|
||||||
echo '${{ github.event.pull_request.body }}' > pr_body.txt
|
with:
|
||||||
|
script: |
|
||||||
|
const fs = require('fs');
|
||||||
|
fs.writeFileSync('pr_body.md', context.payload.pull_request.body || '');
|
||||||
|
|
||||||
- name: Extract version
|
- name: Extract version
|
||||||
id: extract_version
|
id: extract_version
|
||||||
@@ -43,7 +46,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
name: Release ${{ steps.extract_version.outputs.version }}
|
name: Release ${{ steps.extract_version.outputs.version }}
|
||||||
body_path: pr_body.txt
|
body_path: pr_body.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user