name: Submit to Winget Community Repo

on:
  release:
    types: [published]
  workflow_dispatch:
    inputs:
      tag:
        type: string
        description: The release tag to submit
        required: true

jobs:
  winget:
    name: Publish winget package
    runs-on: windows-latest
    steps:
      - name: Submit package to Winget Community Repo
        uses: vedantmgoyal2009/winget-releaser@0db4f0a478166abd0fa438c631849f0b8dcfb99f
        with:
          identifier: Vencord.Vesktop
          token: ${{ secrets.WINGET_PAT }}
          installers-regex: '\.exe$'
          release-tag: ${{ inputs.tag || github.event.release.tag_name }}
          fork-user: shiggybot
