Skip to content

Commit c40fd26

Browse files
mjcheethamdscho
authored andcommitted
Fix WinGet release workflow to account for new installation matrix (#718)
Update the WinGet release workflow to match the updating manifest in `microsoft/winget-pkgs`, where there are now four installation options: - x86_64 / x64 with machine scope - x86_64 / x64 with user scope - aarch64 / arm64 with machine scope - aarch64 / arm64 with user scope
2 parents 27273ae + 0908f83 commit c40fd26

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/release-winget.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,22 @@ jobs:
2929
run: |
3030
# Get correct release asset
3131
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
32-
$asset = $github.release.assets | Where-Object -Property name -match '64-bit.exe$'
32+
$asset_x64 = $github.release.assets | Where-Object -Property name -match '64-bit.exe$'
33+
$asset_arm64 = $github.release.assets | Where-Object -Property name -match 'arm64.exe$'
3334
3435
# Remove 'v' and 'vfs' from the version
3536
$github.release.tag_name -match '\d.*'
3637
$version = $Matches[0] -replace ".vfs",""
3738
3839
# Download wingetcreate and create manifests
3940
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
40-
.\wingetcreate.exe update Microsoft.Git -u $asset.browser_download_url -v $version -o manifests
41+
.\wingetcreate.exe update Microsoft.Git `
42+
-v $version `
43+
-o manifests `
44+
-u "$($asset_x64.browser_download_url)|x64|machine" `
45+
"$($asset_x64.browser_download_url)|x64|user" `
46+
"$($asset_arm64.browser_download_url)|arm64|machine" `
47+
"$($asset_arm64.browser_download_url)|arm64|user"
4148
4249
# Manually substitute the name of the default branch in the License
4350
# and Copyright URLs since the tooling cannot do that for us.

0 commit comments

Comments
 (0)