mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-12 19:42:32 +02:00
22 lines
906 B
YAML
22 lines
906 B
YAML
name: Submit UVtools package to Windows Package Manager Community Repository
|
|
|
|
on:
|
|
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 '.+win-x64.+\.msi' | Select -ExpandProperty browser_download_url -First 1
|
|
if($null -eq $installerUrl){ exit 1 }
|
|
$version = $github.release.tag_name.Replace('v', '')
|
|
if($version.Length -lt 5){ exit 2 }
|
|
.\wingetcreate.exe update PTRTECH.UVtools --version $version --urls $installerUrl --token ${{ secrets.WINGET_TOKEN }} --submit
|