name: Homebrew

on:
  release:
    types: [published]

jobs:
  update-tap:
    name: Update Homebrew tap
    runs-on: ubuntu-latest
    steps:
      - name: Update formula
        uses: mislav/bump-homebrew-formula-action@v3
        with:
          formula-name: clync
          homebrew-tap: Saturate/homebrew-clync
          tag-name: ${{ github.event.release.tag_name }}
          download-url: https://github.com/Saturate/clync/releases/download/${{ github.event.release.tag_name }}/clync-x86_64-unknown-linux-gnu.tar.gz
        env:
          COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
