ci: auto-submit winget version bump on release

New 'winget' job runs after all platform builds: wingetcreate updates
Hoornet.Vega with the new version + installer URL and submits the PR
to microsoft/winget-pkgs. Skips cleanly if WINGET_TOKEN secret is unset.
This commit is contained in:
Jure
2026-07-31 21:56:30 +02:00
parent 382a9389ad
commit 671dfd7034
+15
View File
@@ -308,3 +308,18 @@ jobs:
prerelease: false
includeUpdaterJson: true
args: ${{ matrix.args }}
winget:
needs: release
runs-on: windows-latest
env:
WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }}
steps:
- name: Submit version update to winget-pkgs
if: env.WINGET_TOKEN != ''
shell: pwsh
run: |
$version = $env:GITHUB_REF_NAME.TrimStart('v')
$url = "https://github.com/hoornet/vega/releases/download/v$version/Vega_${version}_x64-setup.exe"
Invoke-WebRequest -Uri https://aka.ms/wingetcreate -OutFile wingetcreate.exe
.\wingetcreate.exe update Hoornet.Vega --version $version --urls $url --submit --token $env:WINGET_TOKEN