name: Publish to WinGet
on:
  release:
    types: [released]

jobs:
  publish:
    runs-on: windows-latest
    steps:
      - uses: vedantmgoyal2009/winget-releaser@latest
        with:
          identifier: PolyMC.PolyMC
          installers-regex: 'PolyMC-Windows-Setup-.+\.exe$'
          token: ${{ secrets.WINGET_TOKEN }}
