build: fix auto-release workflow

Escape special chars by using a cleaner approach
This commit is contained in:
Karim shoair
2025-03-17 15:33:07 +02:00
parent e60d0cb4db
commit c004e388c4
+6 -3
View File
@@ -23,8 +23,11 @@ jobs:
run: echo "title=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT
- name: Save PR body to file
run: |
echo '${{ github.event.pull_request.body }}' > pr_body.txt
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
fs.writeFileSync('pr_body.md', context.payload.pull_request.body || '');
- name: Extract version
id: extract_version
@@ -43,7 +46,7 @@ jobs:
with:
tag_name: ${{ steps.extract_version.outputs.version }}
name: Release ${{ steps.extract_version.outputs.version }}
body_path: pr_body.txt
body_path: pr_body.md
draft: false
prerelease: false
env: