Skip to content

Commit aefe840

Browse files
committed
ci: switch to invoke webrequest
1 parent f889c90 commit aefe840

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ jobs:
3838
3939
- name: Download WTL and nlohmann/json
4040
run: |
41-
$wc = New-Object System.Net.WebClient
42-
$wc.Headers.Add("User-Agent", "Wget/1.21.1")
43-
$wc.Headers.Add("Accept", "*/*")
44-
$wc.Headers.Add("Connection", "keep-alive")
45-
$wc.DownloadFile("https://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.01%20Release/WTL10_01_Release.zip", "${{ runner.temp }}\wtl.zip")
41+
$ProgressPreference = 'SilentlyContinue'
42+
$headers = @{
43+
"User-Agent" = "Wget/1.21.1"
44+
"Accept" = "*/*"
45+
}
46+
Invoke-WebRequest `
47+
-Uri "https://sourceforge.net/projects/wtl/files/WTL%2010/WTL%2010.01%20Release/WTL10_01_Release.zip/download" `
48+
-Headers $headers `
49+
-OutFile "${{ runner.temp }}\wtl.zip"
4650
7z x "${{ runner.temp }}\wtl.zip" -o"lib\WTL" > nul
4751
4852
New-Item -ItemType Directory -Force -Path "lib\nlohmann"

0 commit comments

Comments
 (0)