Skip to content

Publish to WinGet

Publish to WinGet #28

name: Publish to WinGet
on:
workflow_dispatch:
inputs:
VERSION:
description: "The release version of kbcli"
type: string
required: true
default: ''
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: remove prefix v
run: |
publish_version=`bash ${{ github.workspace }}/.github/utils/utils.sh \
--type 1 \
--tag-name ${{ inputs.VERSION }}`
echo "publish_version=${publish_version}" >> $GITHUB_ENV
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: ApeCloud.kbcli
version: ${{ env.publish_version }}
installers-regex: '\.exe$' # Only .exe files
max-versions-to-keep: 5
release-tag: ${{ inputs.VERSION }}
release-repository: kbcli
token: ${{ env.GITHUB_TOKEN }}