Bump Patch Version #10
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 Patch Version" | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- .cruft.json | |
- .editorconfig | |
- .github/**.yml | |
- .gitignore | |
- .pre-commit-config.yaml | |
- .readthedocs.yml | |
- .yamllint.yaml | |
- .zenodo.json | |
- AUTHORS.rst | |
- CONTRIBUTING.rst | |
- HISTORY.rst | |
- MANIFEST.in | |
- Makefile | |
- docs/*.py | |
- docs/*.rst | |
- docs/notebooks | |
- environment-docs.yml | |
- environment.yml | |
- requirements_dev.txt | |
- setup.cfg | |
- setup.py | |
- tests/**.py | |
- tox.ini | |
- xhydro/__init__.py | |
workflow_dispatch: | |
jobs: | |
bump_patch_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Config Commit Bot | |
run: | | |
git config --local user.email "bumpversion[bot]@hydrologie.com" | |
git config --local user.name "bumpversion[bot]" | |
- name: Current Version | |
run: echo "current_version=$(grep -E '__version__' xhydro/__init__.py | cut -d ' ' -f3)" | |
- name: Bump Patch Version | |
run: | | |
pip install bump2version | |
echo "Bumping version" | |
bump2version patch | |
echo "new_version=$(grep -E '__version__' xhydro/__init__.py | cut -d ' ' -f3)" | |
- name: Push Changes | |
uses: ad-m/github-push-action@master | |
with: | |
force: false | |
github_token: ${{ secrets.BUMPVERSION_TOKEN }} | |
branch: ${{ github.ref }} |