File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : auto release demo
2
+ on :
3
+ push :
4
+ # master ブランチにコミットがpushされたときに限定
5
+ branches :
6
+ - master
7
+ paths :
8
+ - ' **.go'
9
+ jobs :
10
+ auto-release :
11
+ runs-on : ubuntu-latest
12
+ env :
13
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14
+ RELEASE_IT_VERSION : 15.6.0
15
+ steps :
16
+ - name : Check out codes
17
+ uses : actions/checkout@v3
18
+ with :
19
+ fetch-depth : 0
20
+ - name : Setup Node
21
+ uses : actions/setup-node@v3
22
+ with :
23
+ node-version : ' 19'
24
+ - name : Set releaser settings
25
+ run : |
26
+ git config --global user.name kenzo0107
27
+ git config --global user.email kenzo.tanaka0107@gmail.com
28
+ - name : Major release
29
+ id : major
30
+ if : contains(toJSON(github.event.commits.*.message), 'bump up version major')
31
+ run : npx release-it@${RELEASE_IT_VERSION} -- major --ci
32
+ - name : Minor release
33
+ id : minor
34
+ # メジャーバージョンアップをしていないときマイナーバージョンアップを行なうか
35
+ if : steps.major.conclusion == 'skipped' && contains(toJSON(github.event.commits.*.message), 'bump up version minor')
36
+ run : npx release-it@${RELEASE_IT_VERSION} -- minor --ci
37
+ - name : Patch release
38
+ # コミットメッセージに特に指定がない場合はマイナーバージョンを更新する
39
+ if : " !(steps.major.conclusion == 'success' || steps.minor.conclusion == 'success')"
40
+ run : npx release-it@${RELEASE_IT_VERSION} -- patch --ci
You can’t perform that action at this time.
0 commit comments