Skip to content

Commit 83a8029

Browse files
feat: Build for release
1 parent 7bc9b62 commit 83a8029

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

README.ja.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- [COMMIT_EMAIL](#commit_email)
2828
- [BRANCH_NAME](#branch_name)
2929
- [CLEAN_TARGETS](#clean_targets)
30+
- [BUILD_COMMAND_TARGET](#build_command_target)
3031
- [CREATE_MAJOR_VERSION_TAG](#create_major_version_tag)
3132
- [CREATE_MINOR_VERSION_TAG](#create_minor_version_tag)
3233
- [OUTPUT_BUILD_INFO_FILENAME](#output_build_info_filename)
@@ -58,7 +59,9 @@
5859
1. workflow を設定
5960
例: `.github/workflows/release.yml`
6061
```yaml
61-
on: push
62+
# on: push
63+
on: create
64+
6265
name: Release
6366
jobs:
6467
release:
@@ -70,12 +73,13 @@
7073
with:
7174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7275
```
76+
[対象イベントの詳細](#action-%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E8%A9%B3%E7%B4%B0)
7377
7478
## オプション
7579
### BUILD_COMMAND
7680
ビルド用コマンド
7781
default: `''`
78-
- `build`、 `production` または `prod` package.json の scripts に含まれる場合、ビルド用のコマンドとしてそれを使用します。
82+
- `build`、 `production` または `prod` package.json の scripts に含まれる場合、ビルド用のコマンドとしてそれを使用します。([BUILD_COMMAND_TARGET](#build_command_target) で変更可能です)
7983
- `npm run install` や `yarn install` のようなインストール用コマンドが存在しない場合、インストール用コマンドが追加されます。
8084
- ビルド用コマンドが空の場合、いくつかのファイルが削除されます。 (詳細:[CLEAN_TARGETS](#clean_targets)).
8185

@@ -110,6 +114,11 @@ default: `'gh-actions'`
110114
default: `.[!.]*,__tests__,src,*.js,*.ts,*.json,*.lock,_config.yml`
111115
絶対パスや `..` は使用できません。
112116

117+
### BUILD_COMMAND_TARGET
118+
ビルド用コマンド検索ターゲット
119+
default: `''`
120+
例:`compile`
121+
113122
### CREATE_MAJOR_VERSION_TAG
114123
メジャーバージョンタグ(例:v1)を作成するかどうか
115124
default: `true`

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Once you create a new tag, this action will automatically
2727
- [COMMIT_EMAIL](#commit_email)
2828
- [BRANCH_NAME](#branch_name)
2929
- [CLEAN_TARGETS](#clean_targets)
30+
- [BUILD_COMMAND_TARGET](#build_command_target)
3031
- [CREATE_MAJOR_VERSION_TAG](#create_major_version_tag)
3132
- [CREATE_MINOR_VERSION_TAG](#create_minor_version_tag)
3233
- [OUTPUT_BUILD_INFO_FILENAME](#output_build_info_filename)
@@ -58,7 +59,9 @@ Once you create a new tag, this action will automatically
5859
1. Setup workflow
5960
e.g. `.github/workflows/release.yml`
6061
```yaml
61-
on: push
62+
# on: push
63+
on: create
64+
6265
name: Release
6366
jobs:
6467
release:
@@ -70,12 +73,13 @@ Once you create a new tag, this action will automatically
7073
with:
7174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7275
```
76+
[More details of target event](#action-event-details)
7377
7478
## Options
7579
### BUILD_COMMAND
7680
Build command.
7781
default: `''`
78-
- If package.json includes `build` or `production` or `prod` in scripts, the command is used for build.
82+
- If package.json includes `build` or `production` or `prod` in scripts, the command is used for build. (You can change this with [BUILD_COMMAND_TARGET](#build_command_target))
7983
- If command does not have install command like `npm run install` or `yarn install`, install commands are added.
8084
- If command is not provided, some files are deleted (see [CLEAN_TARGETS](#clean_targets)).
8185

@@ -111,6 +115,11 @@ Files or directories to delete before release (Comma separated).
111115
default: `.[!.]*,__tests__,src,*.js,*.ts,*.json,*.lock,_config.yml`
112116
Absolute path and `..` are not permitted to use.
113117

118+
### BUILD_COMMAND_TARGET
119+
Command for search build command.
120+
default: `''`
121+
e.g. `compile`
122+
114123
### CREATE_MAJOR_VERSION_TAG
115124
Whether to create major version tag (e.g. v1).
116125
default: `true`

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
description: Secret GitHub API token to use for making API requests.
77
required: true
88
BUILD_COMMAND:
9-
description: Command to build.
9+
description: Commands to build.
1010
default: ''
1111
COMMIT_MESSAGE:
1212
description: Commit message of build commit.
@@ -23,6 +23,9 @@ inputs:
2323
CLEAN_TARGETS:
2424
description: Files or directories to delete before release. (Comma separated)
2525
default: '.[!.]*,__tests__,src,*.js,*.ts,*.json,*.lock,_config.yml'
26+
BUILD_COMMAND_TARGET:
27+
description: Command for search build command.
28+
default: ''
2629
CREATE_MAJOR_VERSION_TAG:
2730
description: Whether to create major version tag.
2831
default: true

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"tagName":"v1.6.0","branch":"gh-actions","tags":["v1.6.0","v1","v1.6"],"updated_at":"2019-09-27T18:51:41.472Z"}
1+
{"tagName":"v1.6.1","branch":"gh-actions","tags":["v1.6.1","v1","v1.6"],"updated_at":"2019-09-27T19:21:21.853Z"}

0 commit comments

Comments
 (0)