File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 13
13
uses : actions/checkout@v3
14
14
with :
15
15
fetch-depth : 0
16
- - name : Set up Go v1.21.4
17
- uses : actions/setup-go@v5
18
- with :
19
- go-version : ' 1.21.4'
20
16
- name : Get tag and set version on release
21
17
if : startsWith(github.ref, 'refs/tags/v')
22
18
run : |
@@ -29,14 +25,17 @@ jobs:
29
25
VERSION="${GITHUB_SHA::7}"
30
26
fi
31
27
echo "VERSION=$VERSION" | tee -a "$GITHUB_ENV"
28
+ - name : Checkout branch
29
+ if : startsWith(github.ref, 'refs/tags/v')
30
+ run : git checkout -B temp_branch
32
31
- name : Bump version on release [${{ env.VERSION }}]
33
32
if : startsWith(github.ref, 'refs/tags/v')
34
33
run : |
35
34
git config user.name "${{ github.actor }}"
36
35
git config user.email "${{ github.actor }}@users.noreply.github.com"
37
36
if [[ $(git diff version.go) != "" ]]; then
38
- git checkout master
39
37
git add version.go
40
38
git commit -m "[CI] Bump version to $VERSION"
41
- git push
39
+ git pull origin master
40
+ git push origin temp_branch:master
42
41
fi
You can’t perform that action at this time.
0 commit comments