Skip to content

Commit 1b2294b

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 5501b4a commit 1b2294b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/main.yml

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

0 commit comments

Comments
 (0)