From cb236cf2b0b7adfa93e2795b46b0513165b8feda Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 26 Jun 2023 02:15:15 -0400 Subject: [PATCH] Install winget in CI --- .github/workflows/ci-suite.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml index 2f7dec0636..b48ceedb04 100644 --- a/.github/workflows/ci-suite.yml +++ b/.github/workflows/ci-suite.yml @@ -954,6 +954,18 @@ jobs: working-directory: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/VSI/DisableOutOfProcBuild run: ./DisableOutOfProcBuild.exe + - name: Install winget + shell: powershell + run: | + $progressPreference = 'silentlyContinue' + $latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object {$_.EndsWith(".msixbundle")} + $latestWingetMsixBundle = $latestWingetMsixBundleUri.Split("/")[-1] + Write-Information "Downloading winget to artifacts directory..." + Invoke-WebRequest -Uri $latestWingetMsixBundleUri -OutFile "./$latestWingetMsixBundle" + Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx + Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx + Add-AppxPackage $latestWingetMsixBundle + - name: Checkout (Branch) uses: actions/checkout@v3 if: github.event_name == 'push' || github.event_name == 'schedule' @@ -1348,6 +1360,18 @@ jobs: with: dotnet-version: ${{ env.TGS_DOTNET_VERSION }} + - name: Install winget + shell: powershell + run: | + $progressPreference = 'silentlyContinue' + $latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object {$_.EndsWith(".msixbundle")} + $latestWingetMsixBundle = $latestWingetMsixBundleUri.Split("/")[-1] + Write-Information "Downloading winget to artifacts directory..." + Invoke-WebRequest -Uri $latestWingetMsixBundleUri -OutFile "./$latestWingetMsixBundle" + Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx + Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx + Add-AppxPackage $latestWingetMsixBundle + - name: Install wingetcreate run: winget install wingetcreate