name: 'CD (firtool)'

on:
  workflow_dispatch:
  # Run every day at 0100 UTC which is:
  #   - 1800 PDT / 1700 PST
  #   - 2100 EDT / 2000 EST
  # This time is chosen because it is after a likely time that a CIRCT release
  # would have happened (during the North American workday), but is not too late
  # that somebody is not available to immediately approve.  Running this in the
  # middle of the night isn't advantageous like typical nightly runs.
  schedule:
    - cron: '0 1 * * *'

jobs:
  cd-circt:
    name: 'Check Version, Create PR'
    runs-on: ubuntu-latest
    steps:
      - name: 'circt/update-circt'
        uses: circt/update-circt@v1.0.0
        with:
          user: chiselbot
          email: chiselbot@users.noreply.github.com
          pr-labels: |
            Dependency Update
          pr-reviewers: |
            seldridge
            jackkoenig
          github-token: ${{ secrets.CHISEL_BOT_TOKEN }}
