aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release-winget.yml12
-rw-r--r--.github/workflows/release.yml13
2 files changed, 13 insertions, 12 deletions
diff --git a/.github/workflows/release-winget.yml b/.github/workflows/release-winget.yml
deleted file mode 100644
index c3ca5fe752..0000000000
--- a/.github/workflows/release-winget.yml
+++ /dev/null
@@ -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
index 3b5c992fc7..d6933e9330 100644
--- 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 }}