Bump #54
This file contains 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: Bump | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 8 * * 1" # "At 08:00 on Monday" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
bump: | |
name: Bump rendered version if changed | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: generate-token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Setup uv | |
uses: yezz123/setup-uv@v4 | |
- name: Install Hatch | |
run: uv pip install --system "hatch>=1.10" | |
- name: Run bump script | |
run: | | |
hatch run tools/sync.py | |
git status | |
git diff | |
- name: Get current version | |
shell: python | |
id: getver | |
run: | | |
import tomllib | |
import os | |
with open("pyproject.toml", "rb") as f: | |
pyproject = tomllib.load(f) | |
with open(os.environ["GITHUB_OUTPUT"], "w", encoding="utf-8") as f: | |
print(f"version={pyproject['project']['version']}", file=f) | |
- uses: peter-evans/create-pull-request@v7 | |
with: | |
title: | | |
chore(deps): bump version to ${{ steps.getver.outputs.version }} | |
body: | | |
Update the stored schema files. | |
PR generated by "Update dependencies" [workflow](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). | |
delete-branch: true | |
token: ${{ steps.generate-token.outputs.token }} | |
sign-commits: true |