Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |