name: Release
on:
  push:
    tags: 'v*'

permissions:
  contents: read

jobs:
  homebrew:
    name: Bump Homebrew formula
    runs-on: ubuntu-latest
    steps:
      - uses: mislav/bump-homebrew-formula-action@v3
        if: "!contains(github.ref, '-')" # skip prereleases
        with:
          formula-name: ruby-build
        env:
          COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
