name: Update pinned dependencies

on:
  schedule:
    - cron: 0 0 * * 0
  workflow_dispatch:

jobs:
  release:
    name: Update pinned dependencies
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Set up Python 3.14
        uses: actions/setup-python@v4
        with:
          python-version: '3.14'
      - name: Update pinned dependencies
        run: ./build.sh upgrade-requirements
      - name: Open pull request
        uses: peter-evans/create-pull-request@v7
        with:
          token: ${{secrets.GH_TOKEN}}
          delete-branch: true
          title: Update pinned dependencies
          body: |
            Automatically update pinned dependencies
          commit-message: 'Update pinned dependencies'
          committer: 'CI on behalf of the Hypothesis team <zac@zhd.dev>'
          author: 'CI on behalf of the Hypothesis team <zac@zhd.dev>'
