auto-update package version #7
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: Update package version | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: write | |
jobs: | |
update_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Run _version.py | |
run: python lair/_version.py | |
- name: Commit changes | |
run: | | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "actions@github.com" | |
git add lair/__init__.py | |
git commit -m "auto-update package version" | |
git push |