mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[Windows] Update zstd to 1.4.9 (#2899)
* install from GitHub releases * rename zstd folder * change wildcard * cut messages
This commit is contained in:
committed by
GitHub
parent
24abe31369
commit
2f03a07621
@@ -3,6 +3,17 @@
|
||||
## Desc: Install zstd
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName zstandard
|
||||
$url = "https://api.github.com/repos/facebook/zstd/releases/latest"
|
||||
# Explicitly set type to string since match returns array by default
|
||||
[System.String] $zstdLatest = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "zstd-.+-win64.zip$"
|
||||
$zstdArchivePath = Start-DownloadWithRetry -Url $zstdLatest -Name "zstd-win64.zip"
|
||||
|
||||
$toolPath = "C:\tools"
|
||||
$zstdPath = Join-Path $toolPath zstd
|
||||
Extract-7Zip -Path $zstdArchivePath -DestinationPath $toolPath
|
||||
Move-Item -Path "${zstdPath}*" -Destination $zstdPath
|
||||
|
||||
# Add zstd-win64 to PATH
|
||||
Add-MachinePathItem $zstdPath
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Zstd"
|
||||
|
||||
Reference in New Issue
Block a user