Skip to content

Use Furo documentation theme (#1731) #234

Use Furo documentation theme (#1731)

Use Furo documentation theme (#1731) #234

Workflow file for this run

name: Bump Patch Version
on:
push:
branches:
- main
paths-ignore:
- .*
- .github/*/*.md
- .github/*/*.yml
- CHANGES.rst
- Makefile
- docs/*/*.ipynb
- docs/*/*.py
- docs/*/*.rst
- docs/Makefile
- docs/make.bat
- docs/references.bib
- environment.yml
- pylintrc
- pyproject.toml
- requirements_upstream.txt
- tox.ini
- xclim/__init__.py
permissions:
contents: read
jobs:
bump_patch_version:
name: Bumpversion Patch
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
pypi.org:443
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
persist-credentials: false
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.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__' xclim/__init__.py | cut -d ' ' -f3)"
echo "current_version=${CURRENT_VERSION}"
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
- name: Install bump-my-version
run: |
python -m pip install bump-my-version
- name: Conditional Bump
id: bump
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
NEW_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)"
echo "new_version=${NEW_VERSION}"
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
- name: Push Changes
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df
with:
force: false
github_token: ${{ secrets.BUMP_VERSION_TOKEN }}
branch: ${{ github.ref }}