Update pre-release.yaml

This commit is contained in:
Chris Titus 2024-08-29 21:40:45 -05:00
parent 7e1c593510
commit 2ba5572b6c

View File

@ -100,12 +100,10 @@ jobs:
- name: Prepare Release Body - name: Prepare Release Body
id: prepare_body id: prepare_body
run: | run: |
$newChanges = @' $newChanges = '${{ steps.generate_notes.outputs.body }}'
${{ steps.generate_notes.outputs.body }}
'@
$formattedChanges = "Changes since ${{ env.LATEST_TAG }}:`n`n$newChanges" $formattedChanges = "Changes since ${{ env.LATEST_TAG }}:`n`n$newChanges"
$encodedChanges = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($formattedChanges)) $escapedChanges = $formattedChanges -replace '%', '%25' -replace '\n', '%0A' -replace '\r', '%0D' -replace "'", '%27' -replace '"', '%22'
echo "body=$encodedChanges" >> $env:GITHUB_OUTPUT echo "body=$escapedChanges" >> $env:GITHUB_OUTPUT
shell: pwsh shell: pwsh
- name: Create and Upload Release - name: Create and Upload Release
@ -115,7 +113,7 @@ jobs:
tag_name: ${{ env.version }} tag_name: ${{ env.version }}
name: Pre-Release ${{ env.version }} name: Pre-Release ${{ env.version }}
body: | 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) ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)
append_body: false append_body: false