goreleaser / goreleaser-action

GitHub Action for GoReleaser
https://github.com/marketplace/actions/goreleaser-action
MIT License
865 stars 78 forks source link

Fix Self-Hosted Windows Error: Expand-Archive #379

Closed flarco closed 1 year ago

flarco commented 2 years ago

This is to fix the Expand-Archive error below:

image

C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\__\actions-runner\_work\_temp\5cae0693-50b6-42ff-91b2-b1b1c5712677' -DestinationPath 'C:\__\actions-runner\_work\_temp\84a07762-c2ab-4f20-a841-c2de094f1b5c' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\__\actions-runner\_work\_temp\5cae0693-50b6-42ff-91b2-b1b1c5712677', 'C:\__\actions-runner\_work\_temp\84a07762-c2ab-4f20-a841-c2de094f1b5c', $true) }"
Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
+ ...  Ignore)) { Expand-Archive -LiteralPath 'C:\__\actions-runner\_work\_ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive

Error: The process 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
caarlos0 commented 1 year ago

merged in https://github.com/goreleaser/goreleaser-action/commit/66134d94a72316c372bfb2832b853f249cf96a0c