diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 991ff25..f8d937f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,16 +16,15 @@ jobs: - name: test.md id: read_release run: | - # https://en.wikipedia.org/wiki/Percent-encoding - $Release = (Get-Content -Path test.md -Encoding utf8 -Raw).replace("`n", "%0A").replace("`r", "%0D") - $Parameters = @{ Uri = "https://api.github.com/repos/Sophia-Community/SophiApp/releases" UseBasicParsing = $true Verbose = $true } $Penultimate = (Invoke-RestMethod @Parameters).tag_name | Select-Object -Index 1 - $Release.replace("NewVersion", "${{ github.ref }}").replace("ReleaseDate", "$((Get-Date).ToShortDateString())").replace("OldVersion", "$($Penultimate)") + + # https://en.wikipedia.org/wiki/Percent-encoding + $Release = (Get-Content -Path test.md -Encoding utf8 -Raw).replace("`n", "%0A").replace("`r", "%0D").replace("NewVersion", "${{ github.ref }}").replace("ReleaseDate", "$((Get-Date).ToShortDateString())").replace("OldVersion", "$($Penultimate)") # https://trstringer.com/github-actions-multiline-strings/ echo "::set-output name=RELEASE_BODY::$Release"