From c004e388c4ba8a391d06e4686f4481ca800b5b1b Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Mon, 17 Mar 2025 15:33:07 +0200 Subject: [PATCH] build: fix auto-release workflow Escape special chars by using a cleaner approach --- .github/workflows/auto-release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index df00bd9..372a960 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -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: