mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
ci(release-winget): publish nightly winget prerelease #20209
This commit is contained in:
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@@ -229,14 +229,31 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
publish-winget:
|
publish-winget:
|
||||||
needs: publish # run after publish job is finished
|
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
|
runs-on: windows-latest # action can only be run on windows
|
||||||
steps:
|
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:
|
with:
|
||||||
identifier: Neovim.Neovim
|
identifier: Neovim.Neovim
|
||||||
# the latter one is a fallback value, reference:
|
# the latter one is a fallback value, reference:
|
||||||
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
|
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
|
||||||
release-tag: ${{ github.event.inputs.tag_name || github.ref }}
|
release-tag: ${{ github.event.inputs.tag_name || github.ref }}
|
||||||
token: ${{ secrets.WINGET_TOKEN }}
|
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 }}
|
||||||
|
Reference in New Issue
Block a user