diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b08c4d3d..a490e1c46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -162,6 +162,8 @@ jobs: - linux - macos - windows + outputs: + version: ${{ steps.info.outputs.version }} steps: - name: Check out code uses: actions/checkout@v2 @@ -284,3 +286,18 @@ jobs: asset_path: ./nushell-windows.msi asset_name: ${{ steps.info.outputs.windowsdir }}.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 }} + +