diff --git a/action.yml b/action.yml index 85bb2498..d307eaeb 100644 --- a/action.yml +++ b/action.yml @@ -97,20 +97,19 @@ runs: - name: Install coveralls reporter (Windows) if: startsWith(runner.os, 'Windows') - shell: bash + shell: pwsh run: | - mkdir -p ~/bin/ - cd ~/bin/ - curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.zip - curl -sLO https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt - cat coveralls-checksums.txt | grep coveralls-windows.zip | sha256sum --check - zcat coveralls-windows.zip > coveralls.exe - rm coveralls-checksums.txt - echo ~/bin >> $GITHUB_PATH + New-Item -Path $env:HOME\bin -ItemType directory + Push-Location $env:HOME\bin + Invoke-WebRequest -Uri "https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.exe" -OutFile "coveralls.exe" + Invoke-WebRequest -Uri "https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-checksums.txt" -OutFile "sha256sums.txt" + (Get-FileHash coveralls.exe).Hash -eq (Get-Content ./sha256sums.txt | Where-Object{$_ -match 'windows.exe'} | ForEach-Object{($_ -split "\s+")[0]}) + Remove-Item *.txt -Force + echo $env:HOME\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Done report if: inputs.parallel-finished == 'true' - shell: bash + shell: ${{ startsWith(runner.os, 'Windows') && 'pwsh' || 'bash' }} run: >- coveralls done ${{ inputs.debug == 'true' && '--debug' || '' }} @@ -128,7 +127,7 @@ runs: - name: Coverage report if: inputs.parallel-finished != 'true' - shell: bash + shell: ${{ startsWith(runner.os, 'Windows') && 'pwsh' || 'bash' }} run: >- coveralls report ${{ inputs.debug == 'true' && '--debug' || '' }}