File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 19
19
- name : Checkout
20
20
uses : actions/checkout@v3
21
21
with :
22
- ref : master
22
+ fetch-depth : 0
23
+ - name : Set env
24
+ run : |
25
+ echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
26
+ echo "BRANCH=$(git branch -r --contains ${GITHUB_REF} | grep -v HEAD | sed -n 's/ *origin\/\(.*\)/\1/p')" >> $GITHUB_ENV
23
27
- name : Set up Python
24
28
uses : actions/setup-python@v4
25
29
with :
30
34
pip install setuptools wheel twine
31
35
- name : get infos from Tag
32
36
run : |
33
- if [[ $GITHUB_REF =~ (([0-9]+)\.([0-9]+)\.([0-9]+))([-./]dev([0-9]+))? ]]
37
+ if [[ $RELEASE_TAG =~ (([0-9]+)\.([0-9]+)\.([0-9]+))([-./]dev([0-9]+))? ]]
34
38
then
35
39
echo "VERSION=${BASH_REMATCH[0]}" >> $GITHUB_ENV
36
40
echo "VERSION_MAJOR=${BASH_REMATCH[2]}" >> $GITHUB_ENV
72
76
- name : commit new version-number
73
77
uses : stefanzweifel/git-auto-commit-action@v4
74
78
with :
79
+ branch : ${{ env.BRANCH }}
80
+ create_branch : true
75
81
commit_message : " increment version after release"
You can’t perform that action at this time.
0 commit comments