ci(win+VS): download the vcpkg artifacts using a dedicated GitHub Action
The Git for Windows project provides a GitHub Action to download and cache Azure Pipelines artifacts (such as the `vcpkg` artifacts), hiding gnarly internals, and also providing some robustness against network glitches. Let's use it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Aug 20, 2024 at 14:31 UTC
9f39e2fa2652131c45cb94758a4720a48ee55cf8
1 file changed
+4
-8
.github/workflows/main.yml
+4
-8
@@ -181,14 +181,10 @@ jobs:
181
repository: 'microsoft/vcpkg'
182
path: 'compat/vcbuild/vcpkg'
183
- name: download vcpkg artifacts
184
- shell: powershell
185
- run: |
186
- $urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
187
- $id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
188
- $downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
189
- (New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
190
- Expand-Archive compat.zip -DestinationPath . -Force
191
- Remove-Item compat.zip
184
+ uses: git-for-windows/get-azure-pipelines-artifact@v0
185
+ with:
186
+ repository: git/git
187
+ definitionId: 9
188
- name: add msbuild to PATH
189
uses: microsoft/setup-msbuild@v2
190
- name: copy dlls to root