Skip to content

Commit

Permalink
Merge pull request #1021 from igmhub/fix_version_bump_with_a_PAT
Browse files Browse the repository at this point in the history
Update bump_version.yml
  • Loading branch information
Waelthus authored Jul 11, 2023
2 parents c757ca4 + 218062e commit dcd4fef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 7.0.2
current_version = 7.0.3
commit = True

[bumpversion:file:py/picca/_version.py]
24 changes: 13 additions & 11 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
name: Bump version
on:
pull_request:
merge_group:
types: [checks_requested]
push:
branches:
- master
paths-ignore:
- '.github/**'
- 'README.md'
- 'CHANGELOG.md'
- 'py/picca/_version.py'
- '.bumpversion.cfg'
jobs:
bump_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
github_token: ${{ secrets.PAT_MW_TOKEN_ACTION }}

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

- 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 --verbose
Expand All @@ -37,7 +40,6 @@ jobs:
run: echo "No version bump requested"

- name: Push changes
if: ${{contains(github.ref_name, 'gh-readonly-queue') }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.PAT_MW_TOKEN_ACTION }}

0 comments on commit dcd4fef

Please sign in to comment.