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

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