Skip to content

Commit 16bd376

Browse files
feat: build for release
1 parent b003b2f commit 16bd376

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

README.ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
| TEST_TAG_PREFIX | テスト用タグのプリフィックス | | | `test/` |
8888
| CLEAN_TEST_TAG | テストタグを掃除するかどうか | `false` | | `true` |
8989
| ORIGINAL_TAG_PREFIX | 元のタグを残す際に付与するプリフィックス | | | `original/` |
90+
| DELETE_NODE_MODULES | node_modules を削除するかどうか | `false` | | `true` |
9091
| GITHUB_TOKEN | アクセストークン | `${{github.token}}` | true | `${{secrets.ACCESS_TOKEN}}` |
9192

9293
## Execute commands

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
| TEST_TAG_PREFIX | Prefix for test tag | | | `test/` |
8888
| CLEAN_TEST_TAG | Whether to clean test tag | `false` | | `true` |
8989
| ORIGINAL_TAG_PREFIX | Prefix to add when leaving the original tag | | | `original/` |
90+
| DELETE_NODE_MODULES | Whether to delete node_modules | `false` | | `true` |
9091
| GITHUB_TOKEN | Access token | `${{github.token}}` | true | `${{secrets.ACCESS_TOKEN}}` |
9192

9293
## Execute commands

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ inputs:
7777
description: Tag name prefix for original tag.
7878
default: ''
7979
required: false
80+
DELETE_NODE_MODULES:
81+
description: Whether to delete node_modules.
82+
default: 'false'
83+
required: false
8084

8185
branding:
8286
icon: 'tag'

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"release-github-actions","sha":"74b05753f47dd7ac016e63be12e8dda5fdde3738","ref":"refs/tags/v7.0.8","tagName":"v7.0.8","branch":"gh-actions","tags":["v7.0.8","v7.0","v7"],"updated_at":"2021-11-12T15:13:41.146Z"}
1+
{"owner":"technote-space","repo":"release-github-actions","sha":"32c922ea9809e6f00a12d749835d9b0ba29f5a17","ref":"refs/tags/v7.1.0","tagName":"v7.1.0","branch":"gh-actions","tags":["v7.1.0","v7.1","v7"],"updated_at":"2021-11-13T05:47:38.096Z"}

lib/utils/misc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,17 @@ const getBuildCommands = (buildDir, pushDir) => {
8686
const runCommand = [pkgManager, runSubCommand].join('');
8787
const hasInstallCommand = !!commands.filter(command => command.includes(`${runCommand}install`)).length;
8888
const buildCommands = (0, exports.detectBuildCommands)(buildDir, runCommand, commands);
89+
const deleteNodeModules = github_action_helper_1.Utils.getBoolValue((0, core_1.getInput)('DELETE_NODE_MODULES'));
8990
if (buildCommands.length) {
9091
commands.push(...buildCommands.map(command => `${runCommand}${command}`));
9192
}
9293
if (!hasInstallCommand && commands.length) {
9394
commands.unshift(`${pkgManager} install`);
9495
}
95-
if (!hasInstallCommand) {
96+
if (deleteNodeModules) {
97+
commands.push('rm -rdf node_modules');
98+
}
99+
else if (!hasInstallCommand) {
96100
if ('npm' === pkgManager) {
97101
commands.push('rm -rdf node_modules');
98102
}

node_modules/.yarn-integrity

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)