2022-06-15 12:35:28 +00:00
|
|
|
name: Submit Nushell package to Windows Package Manager Community Repository
|
2021-07-22 16:38:03 +00:00
|
|
|
|
|
|
|
on:
|
2022-03-23 02:09:58 +00:00
|
|
|
workflow_dispatch:
|
2021-07-22 16:38:03 +00: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: |
|
2022-08-17 16:11:19 +00:00
|
|
|
iwr https://github.com/microsoft/winget-create/releases/download/v1.0.4.0/wingetcreate.exe -OutFile wingetcreate.exe
|
2021-07-22 16:38:03 +00:00
|
|
|
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
|
2022-06-15 12:35:28 +00:00
|
|
|
$installerUrl = $github.release.assets | Where-Object -Property name -match 'windows-msvc.msi' | Select -ExpandProperty browser_download_url -First 1
|
2021-07-22 16:38:03 +00:00
|
|
|
.\wingetcreate.exe update Nushell.Nushell -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.NUSHELL_PAT }}
|