Skip to content

Workflow file for this run

name: Submit stable release to WinGet
on:
workflow_dispatch:
release:
types: [released]
jobs:
winget:
name: Publish release to WinGet
runs-on: windows-latest
steps:
- name: Submit installer to Windows Package Manager Community Repository
run: |
$gitToken = "${{ secrets.WINGET_PAT }}"
$github = Invoke-RestMethod -uri "https://api.github.com/repos/srwi/EverythingToolbar/releases"
$targetRelease = $github | Where-Object { $_.prerelease -eq $false } | Select -First 1
$installerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match "EverythingToolbar.*msi" | Select -ExpandProperty browser_download_url
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update stnkl.EverythingToolbar -s -v $targetRelease.tag_name -u $installerUrl -t $gitToken