Skip to content

Commit 04bf00c

Browse files
dschoGit for Windows Build Agent
authored andcommitted
ci(vs-build): download the vcpkg artifacts using a dedicated Action
We now have 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 <[email protected]>
1 parent f00a3c4 commit 04bf00c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,10 @@ jobs:
142142
repository: 'microsoft/vcpkg'
143143
path: 'compat/vcbuild/vcpkg'
144144
- name: download vcpkg artifacts
145-
shell: powershell
146-
run: |
147-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
148-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
149-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
150-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
151-
Expand-Archive compat.zip -DestinationPath . -Force
152-
Remove-Item compat.zip
145+
uses: git-for-windows/get-azure-pipelines-artifact@v0
146+
with:
147+
repository: git/git
148+
definitionId: 9
153149
- name: add msbuild to PATH
154150
uses: microsoft/setup-msbuild@v1
155151
- name: copy dlls to root

0 commit comments

Comments
 (0)