-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (29 loc) · 941 Bytes
/
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
name: Bump Version on PR Merge
on:
pull_request:
types: [closed]
branches:
- master
jobs:
version-bump:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9' # Specify the Python version
- name: Install bump-my-version
run: pip install bump-my-version
- name: Bump version
run: bump-my-version bump patch # Adjust the bump command as needed
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
BUMPED_VERSION=$(python -c "exec(open('pycrunch/version.py').read()); print(version_info_str)")
git add -A
git commit -m "Bump version to $BUMPED_VERSION"
git push