mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
Create package-submissions.yml
This commit is contained in:
22
.github/workflows/package-submissions.yml
vendored
Normal file
22
.github/workflows/package-submissions.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Submit Microsoft.PowerToys package to Windows Package Manager Community Repository
|
||||
# based off of https://github.com/nushell/nushell/blob/main/.github/workflows/winget-submission.yml
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
winget:
|
||||
name: Publish winget package
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Submit package to Windows Package Manager Community Repository
|
||||
run: |
|
||||
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
||||
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
|
||||
$installerUrl = $github.release.assets | Where-Object -Property name -match 'PowerToysSetup' | Select -ExpandProperty browser_download_url -First 1
|
||||
$wingetPackage = "Microsoft.PowerToys"
|
||||
$gitToken = {{ secrets.pt_WinGet }}
|
||||
.\wingetcreate.exe update $wingetPackage -s -v $github.release.tag_name.Trim("v") -u $installerUrl -t $gitToken
|
||||
Reference in New Issue
Block a user