Skip to content

Commit

Permalink
Merge e6fca39 into 3e44260
Browse files Browse the repository at this point in the history
  • Loading branch information
Waelthus committed Jun 14, 2023
2 parents 3e44260 + e6fca39 commit f98ffdd
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[bumpversion]
current_version = 7.0.1
commit = True
43 changes: 43 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bump version
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2

- name: Install bump2version
run: pip install bump2version

- name: Setup git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: increase patch
if: ${{ always() && (!contains(github.event.head_commit.message, '[bump major]')) && (!contains(github.event.head_commit.message, '[bump minor]')) && (!contains(github.event.head_commit.message, '[no bump]')) }}
run: bump2version patch py/picca/_version.py --verbose

- name: Bump major version
if: ${{ always() && contains(github.event.head_commit.message, '[bump major]') }}
run: bump2version major py/picca/_version.py --tag --verbose

- name: Bump minor version
if: ${{ always() && contains(github.event.head_commit.message, '[bump minor]') }}
run: bump2version minor py/picca/_version.py --tag --verbose

- name: No version bump
if: ${{ always() && contains(github.event.head_commit.message, '[no bump]') }}
run: echo "No version bump requested"

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit f98ffdd

Please sign in to comment.