Skip to content

Update routing_product.py (#401) #2

Update routing_product.py (#401)

Update routing_product.py (#401) #2

Workflow file for this run

# This workflow requires a personal access token named `BUMP_VERSION_TOKEN` with the following privileges:
# - Contents: Read and Write
# - Metadata: Read-Only
# - Pull Requests: Read and Write
name: "Bump Patch Version"
on:
push:
branches:
- master
paths-ignore:
- .cruft.json
- .editorconfig
- .github/**.yml
- .gitignore
- .pre-commit-config.yaml
- .yamllint.yaml
- .zenodo.json
- AUTHORS.rst
- CHANGELOG.rst
- CI/**/*.in
- CI/**/*.py
- CI/**/*.txt
- CODE_OF_CONDUCT.md
- CONTRIBUTING.rst
- Makefile
- .readthedocs.yml
- docs/*.py
- docs/*.rst
- environment-docs.yml
- environment-dev.yml
- pyproject.toml
- tests/**.py
- tox.ini
- src/ravenpy/__init__.py
workflow_dispatch:
permissions:
contents: read
jobs:
bump_patch_version:
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
pypi.org:443
- name: Checkout Repository (no persist-credentials)
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python3
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.x"
- name: Config Commit Bot
run: |
git config --local user.email "bumpversion[bot]@ouranos.ca"
git config --local user.name "bumpversion[bot]"
- name: Current Version
run: |
CURRENT_VERSION="$(grep -E '__version__' src/ravenpy/__init__.py | cut -d ' ' -f3)"
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Install CI libraries
run: |
python -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Conditional Bump Version
run: |
if [[ ${{ env.CURRENT_VERSION }} =~ -dev(\.\d+)? ]]; then
echo "Development version (ends in 'dev(\.\d+)?'), bumping 'build' version"
bump-my-version bump build
else
echo "Version is stable, bumping 'patch' version"
bump-my-version bump patch
fi
bump-my-version show-bump
- name: Push Changes
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # v0.8.0
with:
force: false
github_token: ${{ secrets.BUMP_VERSION_TOKEN }}
branch: ${{ github.ref }}