2022-06-15 14:35:28 +02:00
|
|
|
name: Submit Nushell package to Windows Package Manager Community Repository
|
2021-07-22 18:38:03 +02:00
|
|
|
|
|
|
|
on:
|
2022-03-23 03:09:58 +01:00
|
|
|
workflow_dispatch:
|
2021-07-22 18:38:03 +02:00
|
|
|
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
|
2022-06-15 14:35:28 +02:00
|
|
|
$installerUrl = $github.release.assets | Where-Object -Property name -match 'windows-msvc.msi' | Select -ExpandProperty browser_download_url -First 1
|
2021-07-22 18:38:03 +02:00
|
|
|
.\wingetcreate.exe update Nushell.Nushell -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.NUSHELL_PAT }}
|