Update bump_version_setupcfg.py #57
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: Automated Version Bump | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.9 🐍 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip build | |
- name: Run version bump script | |
run: python .github/bump_version_setupcfg.py | |
- name: Commit and push version bump | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add setup.cfg | |
git commit -m "Automated version bump" || echo "No changes to commit" | |
git push | |
- name: Build distribution 📦 | |
run: python -m build | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |