ci: add publish-to-winget action

This commit is contained in:
baicaixiaozhan
2026-02-04 20:02:43 +08:00
parent 6cda430f03
commit 1486b98d27

21
.github/workflows/release-winget.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Publish to WinGet
on:
release:
types: [released]
workflow_dispatch:
inputs:
release_tag:
required: true
description: 'Tag of release you want to publish'
type: string
jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal9/winget-releaser@v2
with:
identifier: Syngnat.GoNavi
installers-regex: 'windows-(amd64|arm64)\.exe$'
release-tag: ${{ inputs.release_tag || github.event.release.tag_name }}
# Make sure that the WINGET_TOKEN has the permissions for the repo, workflow, and pull_request.
token: ${{ secrets.WINGET_TOKEN }}