File tree Expand file tree Collapse file tree 3 files changed +27
-28
lines changed Expand file tree Collapse file tree 3 files changed +27
-28
lines changed Original file line number Diff line number Diff line change
1
+ [bumpversion]
2
+ current_version = 0.7.2
3
+
4
+ [bumpversion:file:DESCRIPTION]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
# also see the options file for configuration
3
3
name : Manage versions
4
4
5
- # not actually on all pushes, see the options file
6
- on : [push]
5
+ on :
6
+ push :
7
+ branches : [dev, main]
8
+ workflow_dispatch :
7
9
8
10
jobs :
9
11
bump :
@@ -15,11 +17,23 @@ jobs:
15
17
16
18
with :
17
19
token : ${{ secrets.DMITRY_PAT }}
18
- - uses : actions/setup-node@v1
20
+ - name : Set up Python 3.8
21
+ uses : actions/setup-python@v2
19
22
with :
20
- node-version : " 12"
21
- - name : Bump Versions
22
- uses : michmich112/version-bumper@master
23
- with :
24
- options-file : " ./.github/version_bump_options.json"
25
- github-token : ${{ secrets.DMITRY_PAT }}
23
+ python-version : 3.8
24
+ - name : Change version number
25
+ id : version
26
+ run : |
27
+ python -m pip install bump2version
28
+ if [[ "${{ GITHUB_EVENT_NAME }}" == "pull_request"* ]]; then
29
+ branch=$(echo "${{ GITHUB_BASE_REF }}")
30
+ else
31
+ branch=$(echo "${{ GITHUB_REF_NAME }}")
32
+ fi
33
+ if [[ $branch == "main" ]]; then
34
+ version="minor"
35
+ else
36
+ version="patch"
37
+ fi
38
+ bump2version $version --commit --message "Bump version: {current_version} → {new_version}" --allow-dirty
39
+ git push
You can’t perform that action at this time.
0 commit comments