name: Automatically release a new version of flyctl

on:
  schedule:
    - cron: "0 19 * * MON-THU" # Runs at 3 PM Eastern Daylight Time Monday Through Thursday (8 PM UTC)
  workflow_dispatch:

permissions:
  contents: write

jobs:
  run_script:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout master branch
        uses: actions/checkout@v4
        with:
          fetch-tags: true
          fetch-depth: "0"

      - name: Bump version
        uses: superfly/github-tag-action@v1.67.0-fork
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          WITH_V: true
          DEFAULT_BUMP: "patch"
