name: Release to winget
on:
  release:
    types: [ published ]
  workflow_dispatch:
    inputs:
      release_tag:
        description: 'Git tag to release from'
        type: string
        required: true
jobs:
  release-winget:
    runs-on: ubuntu-latest
    steps:
      - name: Publish to WinGet
        uses: vedantmgoyal9/winget-releaser@main
        with:
          identifier: TriliumNext.Notes
          token: ${{ secrets.WINGET_PAT  }}
          release-tag:  ${{ github.event.inputs.release_tag || github.event.release.tag_name }}
