Skip to content

Commit 468ce8f

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
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 f139fda commit 468ce8f

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
@@ -181,14 +181,10 @@ jobs:
181181
repository: 'microsoft/vcpkg'
182182
path: 'compat/vcbuild/vcpkg'
183183
- 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
192188
- name: add msbuild to PATH
193189
uses: microsoft/setup-msbuild@v1
194190
- name: copy dlls to root

0 commit comments

Comments
 (0)