Skip to content

Commit

Permalink
💚 add auto release action
Browse files Browse the repository at this point in the history
  • Loading branch information
budougumi0617 committed Apr 18, 2021
1 parent 7ae064a commit b185424
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
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

0 comments on commit b185424

Please sign in to comment.