From 2ba5572b6c16693d848cc5d652f0ca95b7643424 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 29 Aug 2024 21:40:45 -0500 Subject: [PATCH] Update pre-release.yaml --- .github/workflows/pre-release.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index cf0f7f18..70aff261 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -100,12 +100,10 @@ jobs: - name: Prepare Release Body id: prepare_body run: | - $newChanges = @' - ${{ steps.generate_notes.outputs.body }} - '@ + $newChanges = '${{ steps.generate_notes.outputs.body }}' $formattedChanges = "Changes since ${{ env.LATEST_TAG }}:`n`n$newChanges" - $encodedChanges = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($formattedChanges)) - echo "body=$encodedChanges" >> $env:GITHUB_OUTPUT + $escapedChanges = $formattedChanges -replace '%', '%25' -replace '\n', '%0A' -replace '\r', '%0D' -replace "'", '%27' -replace '"', '%22' + echo "body=$escapedChanges" >> $env:GITHUB_OUTPUT shell: pwsh - name: Create and Upload Release @@ -115,7 +113,7 @@ jobs: tag_name: ${{ env.version }} name: Pre-Release ${{ env.version }} body: | - ${{ '{{' }} fromJson(format('"{0}"', steps.prepare_body.outputs.body)) | base64decode {{ '}}' }} + ${{ steps.prepare_body.outputs.body }} ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1) append_body: false