From 4e13c339ec2cad37535e8a6348b66f860f5256a1 Mon Sep 17 00:00:00 2001 From: TechWatching <15186176+TechWatching@users.noreply.github.com> Date: Thu, 1 Jul 2021 23:24:38 +0200 Subject: [PATCH] Submit package to winget during release. (#3717) Add a new job winget in release.yaml that uses wingetcreate to submit package. --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 }} + +