File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ [bumpversion]
2+ commit = True
3+ tag = False
4+ message = Bump version: {current_version} → {new_version}
5+
6+ [bumpversion:file:setup.py]
7+ search =' {current_version}'
8+ replace =' {new_version}'
Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@v2
15+ with :
16+ fetch-depth : 0
17+ - name : Get Release
18+ 19+ id : get_release
20+ env :
21+ GITHUB_TOKEN : ${{ github.token }}
22+ with :
23+ tag_name : ${{ github.ref }}
24+ - name : Bump up version
25+ env :
26+ NEW_TAG : ${{ steps.get_release.outputs.tag_name }}
27+ run : |
28+ pip install --upgrade bumpversion
29+ LAST_TWO_TAGS=$(git for-each-ref refs/tags/ --count=2 --sort=-v:refname --format="%(refname:short)")
30+ LAST_ONE=$(echo $LAST_TWO_TAGS | cut -d' ' -f 2)
31+ last_version=$(echo ${LAST_ONE//v/""})
32+ echo Last version: ${last_version}
33+ new_version=$(echo ${NEW_TAG//v/""})
34+ echo New version: ${new_version}
35+ git config --local user.name "github-actions[bot]"
36+ bumpversion --current-version $last_version --new-version $new_version setup.py
1537 - name : update changelog with gren
1638 env :
1739 GREN_GITHUB_TOKEN : ${{ secrets.TOKEN }}
Original file line number Diff line number Diff line change @@ -21,3 +21,7 @@ License: Apache-2.0
2121Files: requirements*.txt
2222Copyright: 2021 LG Electronics
2323License: Apache-2.0
24+
25+ Files: .bumpversion.cfg
26+ Copyright: 2021 LG Electronics
27+ License: Apache-2.0
You can’t perform that action at this time.
0 commit comments