Merge pull request #4 from budougumi0617/feat/use-uber-mock #4
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
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 | |