name: Publish to WinGet
on:
  release:
    types: [released]
jobs:
  publish:
    runs-on: windows-latest
    if: ${{ startsWith(github.event.release.tag_name, 'v') }} && github.repository_owner == 'Chatterino'
    steps:
      - uses: vedantmgoyal9/winget-releaser@main
        with:
          identifier: ChatterinoTeam.Chatterino
          installers-regex: ^Chatterino.Installer.exe$
          token: ${{ secrets.WINGET_TOKEN }}
          fork-user: chatterino-ci
