Skip to content

Commit cbb43ed

Browse files
committed
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 8829704 commit cbb43ed

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
@@ -164,14 +164,10 @@ jobs:
164164
repository: 'microsoft/vcpkg'
165165
path: 'compat/vcbuild/vcpkg'
166166
- name: download vcpkg artifacts
167-
shell: powershell
168-
run: |
169-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
170-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
171-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
172-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
173-
Expand-Archive compat.zip -DestinationPath . -Force
174-
Remove-Item compat.zip
167+
uses: git-for-windows/get-azure-pipelines-artifact@v0
168+
with:
169+
repository: git/git
170+
definitionId: 9
175171
- name: add msbuild to PATH
176172
uses: microsoft/setup-msbuild@v1
177173
- name: copy dlls to root

0 commit comments

Comments
 (0)