CI/GitHub: Fixed installing openssl for windows actions

This commit is contained in:
Shauren
2024-06-05 11:29:56 +02:00
parent 80805aa9ee
commit 01026445bb

View File

@@ -23,7 +23,16 @@ jobs:
- name: Download and install Openssl 3.x
run: |
$Url = "https://slproweb.com/download/Win64OpenSSL-3_2_1.exe"
$VersionsUrl = "https://raw.githubusercontent.com/slproweb/opensslhashes/master/win32_openssl_hashes.json"
$Url = (Invoke-RestMethod $VersionsUrl).files.PSObject.Properties |
Select-Object -ExpandProperty Value |
Where-Object { $_.arch -eq 'INTEL' } |
Where-Object { $_.bits -eq '64' } |
Where-Object { $_.light -eq $false } |
Where-Object { $_.installer -eq 'exe' } |
Sort-Object -Descending @{ Expression = { [version]$_.basever } } |
Select-Object -First 1 -ExpandProperty url
(New-Object System.Net.WebClient).DownloadFile($Url, "${{ env.TEMP }}\openssl.exe")
Start-Process -Wait -FilePath "${{ env.TEMP }}\openssl.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES",/DIR=${{ env.OPENSSL_ROOT_DIR }}