-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ae064a
commit b185424
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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@v2 | ||
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 [email protected] | ||
- 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 |