-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.64 KB
/
bump-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow requires a personal access token named `BUMPVERSION_TOKEN` with the following privileges:
# - repo
# - workflow
name: "Bump Patch Version"
on:
push:
branches:
- main
paths-ignore:
- .cruft.json
- .editorconfig
- .github/**.yml
- .gitignore
- .pre-commit-config.yaml
- .yamllint.yaml
- .zenodo.json
- AUTHORS.rst
- CHANGES.rst
- CONTRIBUTING.rst
- Makefile
- .readthedocs.yml
- docs/*.py
- docs/*.rst
- environment-docs.yml
- environment-dev.yml
- pyproject.toml
- tests/**.py
- tox.ini
- figanos/__init__.py
workflow_dispatch:
jobs:
bump_patch_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v4
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: echo "current_version=$(grep -E '__version__' figanos/__init__.py | cut -d ' ' -f3)"
- name: Bump Patch Version
run: |
pip install bump-my-version
echo "Bumping version"
bump-my-version bump --tag patch
echo "new_version=$(grep -E '__version__' figanos/__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 }}