mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
ci(release-winget): publish nightly winget prerelease #20209
This commit is contained in:
parent
6cc03b9c90
commit
c126c1f73a
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@ -229,14 +229,31 @@ jobs:
|
||||
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
|
||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||
name: Publish stable
|
||||
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 }}
|
||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||
name: Get nightly version
|
||||
id: get-version
|
||||
run: |
|
||||
Invoke-WebRequest https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.msi -OutFile setup.msi
|
||||
Install-Module -Name 'Carbon' -AllowClobber -Force
|
||||
Import-Module Carbon
|
||||
$VERSION = (Get-CMsi .\setup.msi).ProductVersion
|
||||
echo "::set-output name=version::$VERSION"
|
||||
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
|
||||
name: Publish nightly
|
||||
uses: vedantmgoyal2009/winget-releaser@latest
|
||||
with:
|
||||
identifier: Neovim.Neovim.Nightly
|
||||
version: ${{ steps.get-version.outputs.version }}
|
||||
release-tag: nightly
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user