Skip to content

Commit 80a7d92

Browse files
feat: Build for release
1 parent 795acbb commit 80a7d92

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@
55
[![CodeFactor](https://www.codefactor.io/repository/github/technote-space/release-github-actions/badge)](https://www.codefactor.io/repository/github/technote-space/release-github-actions)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/technote-space/release-github-actions/blob/master/LICENSE)
77

8-
GitHub actions to auto release.
8+
GitHub action for release automation.
99
Once you publish the release, this action will automatically
1010
1. Run build
1111
1. Create branch for release
1212
1. Change [tags](#tags) to release branch
1313
1. Change release tag
1414

15+
## Screenshots
16+
1. Before publish release
17+
<img src="https://raw.githubusercontent.com/technote-space/release-github-actions/images/screenshot-1.png" alt="step1" width=500/>
18+
1. Publish release
19+
<img src="https://raw.githubusercontent.com/technote-space/release-github-actions/images/screenshot-2.png" alt="step2" width=500/>
20+
1. Running GitHub Action
21+
<img src="https://raw.githubusercontent.com/technote-space/release-github-actions/images/screenshot-3.png" alt="step3" width=500/>
22+
1. After running GitHub Action
23+
<img src="https://raw.githubusercontent.com/technote-space/release-github-actions/images/screenshot-4.png" alt="step4" width=500/>
24+
1525
## Installation
1626
1. Setup workflow
1727
e.g. `.github/workflows/release.yml`
@@ -30,8 +40,8 @@ Once you publish the release, this action will automatically
3040
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
3141
```
3242
33-
### Required parameter
34-
#### ACCESS_TOKEN
43+
## Required parameter
44+
### ACCESS_TOKEN
3545
1. Generate a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) with the public_repo or repo scope.
3646
(repo is required for private repositories).
3747
1. [Save as secrets](https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables)
@@ -52,7 +62,7 @@ yarn build
5262
yarn install --production
5363
rm -rdf .github
5464
...
55-
rm -rdf *.lock
65+
rm -rdf _config.yml
5666
```
5767

5868
### COMMIT_MESSAGE
@@ -89,7 +99,7 @@ Set to `false` if you do not want to create a minor version tag.
8999
[Detail of tags](#tags)
90100

91101
### OUTPUT_BUILD_INFO_FILENAME
92-
Filename of build information.
102+
Filename of build information.
93103
default: `''`
94104
Absolute path and `..` are not permitted to use.
95105
If this setting is not empty, following information is output with the file name.
@@ -99,6 +109,7 @@ If this setting is not empty, following information is output with the file name
99109
"branch": "${branch}",
100110
"tags": [
101111
"${created_tag_1}",
112+
"...",
102113
"${created_tag_n}"
103114
],
104115
"updated_at": "${updated_at}"

_config.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"v1.1.3","branch":"gh-actions","tags":["v1.1.3","v1","v1.1"],"updated_at":"2019-08-28T07:45:27.378Z"}

lib/utils/command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ const copyFiles = (buildDir, pushDir) => __awaiter(this, void 0, void 0, functio
167167
return true;
168168
});
169169
const checkDiff = (pushDir) => __awaiter(this, void 0, void 0, function* () {
170-
return (yield execAsync(`git -C ${pushDir} status --short -uno`)).split(/\r\n|\n/).filter(line => line.match(/^[MDA]\s+/)).length > 0;
170+
return (yield execAsync(`git -C ${pushDir} status --short -uno`, true, 'git status --short -uno')).split(/\r\n|\n/).filter(line => line.match(/^[MDA]\s+/)).length > 0;
171171
});
172172
const execAsync = (command, quiet = false, altCommand = null, suppressError = false) => new Promise((resolve, reject) => {
173173
if ('string' === typeof altCommand)

0 commit comments

Comments
 (0)