name: Publish to WinGet
on:
  release:
    types: [released]
jobs:
  publish:
    runs-on: windows-latest # action can only be run on windows
    steps:
      - uses: vedantmgoyal2009/winget-releaser@v1
        with:
          identifier: Balena.Etcher
          installers-regex: 'balenaEtcher-Setup.*.exe$'
          token: ${{ secrets.WINGET_PAT }}
