-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[PRERELEASE]] github actions workflow 追加
- Loading branch information
1 parent
4ce59cd
commit 7b63eb8
Showing
4 changed files
with
128 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,27 @@ | ||
name: release apps | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '**' | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipenv | ||
pip install wheel | ||
- name: Build | ||
run: | | ||
pipenv run clean | ||
pipenv run build | ||
pipenv run deploy |
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,28 @@ | ||
name: release RC apps | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '**' | ||
# prerelease only | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipenv | ||
pip install wheel | ||
- name: Build | ||
run: | | ||
pipenv run clean | ||
pipenv run build | ||
pipenv run test-deploy |
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,40 @@ | ||
name: auto versioning for main branch | ||
on: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches: | ||
- main | ||
jobs: | ||
version-up-main: | ||
runs-on: ubuntu-latest | ||
env: | ||
# https://github.community/t/github-action-trigger-on-release-not-working-if-releases-was-created-by-automation/16559 | ||
RELEASE_IT_VERSION: 14.14.0 | ||
BUMPER_VERSION: 3.0.1 | ||
steps: | ||
- name: Check out codes | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16' | ||
# バージョン更新コミットは対象外 | ||
- name: Patch release | ||
if: "!contains(toJSON(github.event.commits.*.message), '[automate_versioning] Release')" | ||
run: | | ||
echo 'UPDATE_ARGS=patch' >> $GITHUB_ENV | ||
- name: Minor release | ||
if: contains(toJSON(github.event.commits.*.message), '[[MINOR]]') | ||
run: | | ||
echo 'UPDATE_ARGS=minor' >> $GITHUB_ENV | ||
- name: Major release | ||
if: contains(toJSON(github.event.commits.*.message), '[[MAJOR]]') | ||
run: | | ||
echo 'UPDATE_ARGS=major' >> $GITHUB_ENV | ||
- name: Release | ||
if: "env.UPDATE_ARGS != ''" | ||
run: | | ||
npm i -g release-it@${RELEASE_IT_VERSION} | ||
npm i -g @release-it/bumper@${BUMPER_VERSION} | ||
release-it -- ${UPDATE_ARGS} --ci |
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,33 @@ | ||
name: auto versioning for main branch | ||
on: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches-ignore: | ||
- main | ||
jobs: | ||
version-up-main: | ||
runs-on: ubuntu-latest | ||
env: | ||
# https://github.community/t/github-action-trigger-on-release-not-working-if-releases-was-created-by-automation/16559 | ||
RELEASE_IT_VERSION: 14.14.0 | ||
BUMPER_VERSION: 3.0.1 | ||
steps: | ||
- name: Check out codes | ||
uses: actions/checkout@v2 | ||
- name: Resolve branch name | ||
run: 'echo BRANCH_NAME="${{ github.ref_name }}" >> $GITHUB_ENV' | ||
- name: Resolve branch hash | ||
run: 'echo BRANCH_NAME_HASH="$(echo $BRANCH_NAME | sha256sum)" >> $GITHUB_ENV' | ||
- name: Resolve rc name | ||
run: echo RC_NAME=${BRANCH_NAME_HASH:1:8} >> $GITHUB_ENV | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16' | ||
- name: Release | ||
if: "contains(toJSON(github.event.commits.*.message), '[[PRERELEASE]]') && !contains(toJSON(github.event.commits.*.message), '[automate_versioning_prerelease] Prerelease ')" | ||
run: | | ||
npm i -g release-it@${RELEASE_IT_VERSION} | ||
npm i -g @release-it/bumper@${BUMPER_VERSION} | ||
release-it -- ${UPDATE_ARGS} --ci |