diff --git a/.github/workflows/winget-submission.yml b/.github/workflows/winget-submission.yml index 7fabe7070c..7cd854b6f9 100644 --- a/.github/workflows/winget-submission.yml +++ b/.github/workflows/winget-submission.yml @@ -1,9 +1,14 @@ name: Submit Nushell package to Windows Package Manager Community Repository on: - workflow_dispatch: release: - types: [published] + types: [released] + workflow_dispatch: + inputs: + tag_name: + description: 'Specific tag name' + required: true + type: string jobs: @@ -12,8 +17,10 @@ jobs: runs-on: windows-latest steps: - name: Submit package to Windows Package Manager Community Repository - run: | - iwr https://github.com/microsoft/winget-create/releases/download/v1.0.4.0/wingetcreate.exe -OutFile wingetcreate.exe - $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json - $installerUrl = $github.release.assets | Where-Object -Property name -match 'windows-msvc.msi' | Select -ExpandProperty browser_download_url -First 1 - .\wingetcreate.exe update Nushell.Nushell -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.NUSHELL_PAT }} + uses: vedantmgoyal2009/winget-releaser@v2 + with: + identifier: Nushell.Nushell + version: ${{ inputs.tag_name || github.event.release.tag_name }} + release-tag: ${{ inputs.tag_name || github.event.release.tag_name }} + token: ${{ secrets.NUSHELL_PAT }} + fork-user: fdncred