Skip to content

Commit cf61bf1

Browse files
committed
Install winget
1 parent e16317d commit cf61bf1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ jobs:
4848
steps:
4949
- name: Checkout repository
5050
uses: actions/checkout@v4
51+
- name: Install WinGet
52+
run: |
53+
$progressPreference = 'silentlyContinue'
54+
$latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object {$_.EndsWith(".msixbundle")}
55+
$latestWingetMsixBundle = $latestWingetMsixBundleUri.Split("/")[-1]
56+
Write-Information "Downloading winget to artifacts directory..."
57+
Invoke-WebRequest -Uri $latestWingetMsixBundleUri -OutFile "./$latestWingetMsixBundle"
58+
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
59+
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
60+
Add-AppxPackage $latestWingetMsixBundle
5161
- name: Create test script
5262
run: |
5363
mkdir $env:TEMP\test-script

0 commit comments

Comments
 (0)