File tree Expand file tree Collapse file tree 3 files changed +24
-26
lines changed Expand file tree Collapse file tree 3 files changed +24
-26
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 :
18
20
- uses : actions/setup-node@v1
19
21
with :
20
22
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
+ - name : Change version number
24
+ id : version
25
+ run : |
26
+ python -m pip install bump2version
27
+ if [[ "${{ GITHUB_EVENT_NAME }}" == "pull_request"* ]]; then
28
+ branch=$(echo "${{ GITHUB_BASE_REF }}")
29
+ else
30
+ branch=$(echo "${{ GITHUB_REF_NAME }}")
31
+ fi
32
+ if [[ $branch == "main" ]]; then
33
+ version="minor"
34
+ else
35
+ version="patch"
36
+ fi
37
+ bump2version $version --commit --message "Bump version: {current_version} → {new_version}" --allow-dirty
38
+ git push
You can’t perform that action at this time.
0 commit comments