Submit package to winget during release. (#3717)

Add a new job winget in release.yaml that uses wingetcreate to submit package.
This commit is contained in:
TechWatching 2021-07-01 23:24:38 +02:00 committed by GitHub
parent 9a1e1d5b1e
commit 4e13c339ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,6 +162,8 @@ jobs:
- linux - linux
- macos - macos
- windows - windows
outputs:
version: ${{ steps.info.outputs.version }}
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -284,3 +286,18 @@ jobs:
asset_path: ./nushell-windows.msi asset_path: ./nushell-windows.msi
asset_name: ${{ steps.info.outputs.windowsdir }}.msi asset_name: ${{ steps.info.outputs.windowsdir }}.msi
asset_content_type: applictaion/x-msi asset_content_type: applictaion/x-msi
winget:
name: Publish winget package
runs-on: windows-latest
needs: release
steps:
- name: Submit package to Windows Package Manager Community Repository
run: |
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
$nushellVersion="${{ needs.release.outputs.version }}"
$nushellInstallerName="nu_$($nushellVersion -replace '\.','_')_windows.msi"
$installerUrl = "https://github.com/nushell/nushell/releases/download/$nushellVersion/$nushellInstallerName"
.\wingetcreate.exe update Nushell.Nushell -v $nushellVersion -u $installerUrl -t ${{ secrets.NUSHELL_PAT }}