commit f9a9956837223b45a266c6cd3294caeb25be5972 parent 02a4974418b7fb18c5034b7b2fc85ce4cde7d370 Author: Vedant <83997633+vedantmgoyal2009@users.noreply.github.com> Date: Sat, 13 Aug 2022 19:04:28 +0530 ci(release): move release-winget steps into release job #19689 Diffstat:
| D | .github/workflows/release-winget.yml | | | 12 | ------------ |
| M | .github/workflows/release.yml | | | 13 | +++++++++++++ |
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/release-winget.yml b/.github/workflows/release-winget.yml @@ -1,12 +0,0 @@ -name: Publish to WinGet -on: - release: - types: [released] -jobs: - publish: - runs-on: windows-latest # action can only be run on windows - steps: - - uses: vedantmgoyal2009/winget-releaser@latest - with: - identifier: Neovim.Neovim - token: ${{ secrets.WINGET_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml @@ -227,3 +227,16 @@ jobs: if [ "$TAG_NAME" != "nightly" ]; then gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/* fi + publish-winget: + needs: publish # run after publish job is finished + # publish to winget only on stable releases + if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') + runs-on: windows-latest # action can only be run on windows + steps: + - uses: vedantmgoyal2009/winget-releaser@latest + with: + identifier: Neovim.Neovim + # the latter one is a fallback value, reference: + # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value + release-tag: ${{ github.event.inputs.tag_name || github.ref }} + token: ${{ secrets.WINGET_TOKEN }}