ci(release): move release-winget steps into release job #19689

This commit is contained in:
Vedant 2022-08-13 19:04:28 +05:30 committed by GitHub
parent 02a4974418
commit f9a9956837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View File

@ -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 }}

View File

@ -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 }}