Create updated stubs PR #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create updated stubs PR | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * 0' # every Sunday at midnight | |
| jobs: | |
| create_pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| enable-cache: true | |
| - name: Update stubs | |
| run: uv run python create_stubs.py | |
| - name: Detect changes | |
| id: changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Bump minor version in pyproject.toml | |
| if: steps.changes.outputs.has_changes == 'true' | |
| run: uv version --bump minor | |
| - name: Create pull request | |
| if: steps.changes.outputs.has_changes == 'true' | |
| uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 | |
| with: | |
| token: ${{ secrets.PR_TOKEN }} | |
| commit-message: Update stubs | |
| author: henribru <6639509+henribru@users.noreply.github.com> | |
| committer: henribru <6639509+henribru@users.noreply.github.com> | |
| branch: create-updated-stubs-pr | |
| delete-branch: true | |
| title: Update stubs | |