Skip to content

Commit

Permalink
Update SophiApp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
farag2 committed Oct 16, 2023
1 parent 1b57bc3 commit 5a8d625
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/SophiApp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,14 @@ jobs:
}
$Penultimate = (Invoke-RestMethod @Parameters).tag_name | Select-Object -Index 1
# No need to replace special characters with percent-encoding ones
$Parameters = @{
Uri = "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs"
UseBasicParsing = $true
Verbose = $true
Uri = "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs"
UseBasicParsing = $true
Verbose = $true
}
$html_url = ((Invoke-RestMethod @Parameters).jobs | Where-Object -FilterScript {$_.run_id -eq "${{ github.run_id }}"}).html_url
(Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).Replace("NewVersion", "${{ github.ref_name }}").Replace("OldVersion", $Penultimate).Replace("CurrentDate", $(Get-Date -f "dd.MM.yyyy")).Replace("html_url", $html_url).Replace("SHA256_hash", "${{ env.zip_hash }}") | Set-Content -Path ReleaseNotesTemplate.md -Encoding UTF8
# No need to replace special characters with percent-encoding ones
(Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("NewVersion", "${{ github.ref_name }}").replace("OldVersion", $Penultimate).replace("CurrentDate", $(Get-Date -f "dd.MM.yyyy")).replace("html_url", $html_url).replace("SHA256_hash", "${{ steps.zip_hash.outputs.zip_hash }}") | Set-Content -Path ReleaseNotesTemplate.md -Encoding UTF8 -Force
# https://en.wikipedia.org/wiki/Percent-encoding
Add-Content -Path $env:GITHUB_OUTPUT -Value "ReleaseBody=ReleaseNotesTemplate.md"
Expand Down

0 comments on commit 5a8d625

Please sign in to comment.