-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.29 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: release
on:
push:
branches:
- master
jobs:
release-operation:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_IT_VERSION: 14.2.1
steps:
- name: Check out codes
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "12"
- name: Set releaser settings
run: |
git config --global user.name budougumi0617
git config --global user.email budougumi0617@gmail.com
- name: Major release
id: major
if: contains(toJSON(github.event.commits.*.message), 'bump up version major')
run: npx release-it@${RELEASE_IT_VERSION} -- major --ci
- name: Minor release
id: minor
if: steps.major.conclusion == 'skipped' && contains(toJSON(github.event.commits.*.message), 'bump up version minor')
run: npx release-it@${RELEASE_IT_VERSION} -- minor --ci
- name: Patch release
# コミットメッセージに特に指定がない場合はマイナーバージョンを更新する
if: "!(steps.major.conclusion == 'success' || steps.minor.conclusion == 'success')"
run: npx release-it@${RELEASE_IT_VERSION} -- patch --ci