Skip to content

Commit 2f826de

Browse files
feat: Build for release
1 parent 92e86ac commit 2f826de

File tree

23 files changed

+369
-305
lines changed

23 files changed

+369
-305
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@
77

88
Template for GitHub actions.
99

10+
## Table of Contents
11+
1012
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
1113
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
12-
**Table of Contents**
14+
<details>
15+
<summary>Details</summary>
1316

1417
- [Setup](#setup)
1518
- [yarn](#yarn)
1619
- [npm](#npm)
1720
- [Author](#author)
1821

22+
</details>
1923
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2024

2125
## Setup

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"gh-actions-template","sha":"0d833df3327cb5b2eff623ac46aa627005a73f54","ref":"refs/tags/v0.1.1","tagName":"v0.1.1","branch":"gh-actions","tags":["v0.1.1","v0.1","v0"],"updated_at":"2020-02-05T12:32:12.351Z"}
1+
{"owner":"technote-space","repo":"gh-actions-template","sha":"d47862d61d9d05564f04217256b5ead128164aa2","ref":"refs/tags/v0.1.2","tagName":"v0.1.2","branch":"gh-actions","tags":["v0.1.2","v0.1","v0"],"updated_at":"2020-02-12T05:15:54.359Z"}

lib/main.js

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,19 @@ const core_1 = require("@actions/core");
1717
const context_1 = require("@actions/github/lib/context");
1818
const github_action_helper_1 = require("@technote-space/github-action-helper");
1919
const filter_github_action_1 = require("@technote-space/filter-github-action");
20-
const misc_1 = require("./utils/misc");
2120
const constant_1 = require("./constant");
22-
/**
23-
* run
24-
*/
25-
function run() {
26-
return __awaiter(this, void 0, void 0, function* () {
27-
const logger = new github_action_helper_1.Logger();
28-
const context = new context_1.Context();
29-
github_action_helper_1.ContextHelper.showActionInfo(path_1.default.resolve(__dirname, '..'), logger, context);
30-
if (!filter_github_action_1.isTargetEvent(constant_1.TARGET_EVENTS, context)) {
31-
logger.info('This is not target event.');
32-
return;
33-
}
34-
const octokit = github_action_helper_1.Utils.getOctokit();
35-
console.log(octokit);
36-
console.log(misc_1.getPayload(context));
37-
});
38-
}
39-
run().catch(error => core_1.setFailed(error.message));
21+
const process_1 = require("./process");
22+
const run = () => __awaiter(void 0, void 0, void 0, function* () {
23+
const logger = new github_action_helper_1.Logger();
24+
const context = new context_1.Context();
25+
github_action_helper_1.ContextHelper.showActionInfo(path_1.default.resolve(__dirname, '..'), logger, context);
26+
if (!filter_github_action_1.isTargetEvent(constant_1.TARGET_EVENTS, context)) {
27+
logger.info('This is not target event.');
28+
return;
29+
}
30+
yield process_1.execute(logger, github_action_helper_1.Utils.getOctokit(), context);
31+
});
32+
run().catch(error => {
33+
console.log(error);
34+
core_1.setFailed(error.message);
35+
});

lib/process.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"use strict";
2+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4+
return new (P || (P = Promise))(function (resolve, reject) {
5+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8+
step((generator = generator.apply(thisArg, _arguments || [])).next());
9+
});
10+
};
11+
Object.defineProperty(exports, "__esModule", { value: true });
12+
const github_action_helper_1 = require("@technote-space/github-action-helper");
13+
const misc_1 = require("./utils/misc");
14+
exports.execute = (logger, octokit, context) => __awaiter(void 0, void 0, void 0, function* () {
15+
console.log(misc_1.getPayload(context));
16+
const command = new github_action_helper_1.Command(logger);
17+
yield command.execAsync({
18+
command: 'ls -lat',
19+
});
20+
});

node_modules/.yarn-integrity

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

node_modules/@technote-space/filter-github-action/README.ja.md

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

node_modules/@technote-space/filter-github-action/README.md

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

node_modules/@technote-space/filter-github-action/package.json

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

node_modules/@technote-space/github-action-helper/README.ja.md

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

node_modules/@technote-space/github-action-helper/README.md

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

0 commit comments

Comments
 (0)