typescript-github-action-template 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc.json +21 -0
- package/.vscode/settings.json +11 -0
- package/README.md +1 -0
- package/lib/index.js +7 -4
- package/package.json +20 -10
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"bracketSpacing": true,
|
|
4
|
+
"bracketSameLine": false,
|
|
5
|
+
"semi": true,
|
|
6
|
+
"singleQuote": true,
|
|
7
|
+
"tabWidth": 2,
|
|
8
|
+
"trailingComma": "all",
|
|
9
|
+
"importOrder": [
|
|
10
|
+
"^node:(.*)$",
|
|
11
|
+
"^@action/core/(.*)$",
|
|
12
|
+
"^@action/github/(.*)$",
|
|
13
|
+
"^@action/exec/(.*)$",
|
|
14
|
+
"^@action/glob/(.*)$",
|
|
15
|
+
"^@action/(.*)$",
|
|
16
|
+
"<THIRD_PARTY_MODULES>",
|
|
17
|
+
"^[./]"
|
|
18
|
+
],
|
|
19
|
+
"importOrderSeparation": true,
|
|
20
|
+
"importOrderSortSpecifiers": true
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"yaml.schemas": {
|
|
3
|
+
"https://json.schemastore.org/github-action.json": "action.yml",
|
|
4
|
+
"https://json.schemastore.org/github-funding.json": ".github/FUNDING.yml",
|
|
5
|
+
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml",
|
|
6
|
+
"https://json.schemastore.org/package.json": "package.json",
|
|
7
|
+
"https://json.schemastore.org/tsconfig.json": "tsconfig.json",
|
|
8
|
+
"https://json.schemastore.org/eslintrc.json": ".eslintrc.json",
|
|
9
|
+
"https://json.schemastore.org/prettierrc.json": ".prettierrc.json"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -9,20 +9,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const github_1 = require("@actions/github");
|
|
13
12
|
const core_1 = require("@actions/core");
|
|
13
|
+
const github_1 = require("@actions/github");
|
|
14
14
|
function run() {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
if (!(0, core_1.getState)('isPost')) {
|
|
17
|
+
(0, core_1.saveState)('isPost', 'true');
|
|
18
|
+
}
|
|
16
19
|
(0, core_1.info)(`This is the Action context: ${JSON.stringify(github_1.context)}`);
|
|
17
|
-
(0, core_1.error)(
|
|
20
|
+
(0, core_1.error)('Action needs to be implemented.');
|
|
18
21
|
});
|
|
19
22
|
}
|
|
20
23
|
function cleanup() {
|
|
21
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
(0, core_1.error)(
|
|
25
|
+
(0, core_1.error)('Post action needs to be implemented or removed.');
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
|
-
if (!process.env[
|
|
28
|
+
if (!process.env['STATE_isPost']) {
|
|
26
29
|
run();
|
|
27
30
|
}
|
|
28
31
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-github-action-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "A template to create custom GitHub Action with TypeScript/JavaScript.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"package": "yarn ncc build src/index.ts --source-map --license licenses.txt",
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"lint": "eslint -c .eslintrc.json src",
|
|
13
|
+
"postinstall": "is-ci || husky install",
|
|
13
14
|
"preversion": "rm -rf lib && rm -rf dist && yarn && yarn build && yarn package"
|
|
14
15
|
},
|
|
15
16
|
"repository": {
|
|
@@ -22,21 +23,30 @@
|
|
|
22
23
|
"url": "https://github.com/CatChen/typescript-github-action-template/issues"
|
|
23
24
|
},
|
|
24
25
|
"homepage": "https://github.com/CatChen/typescript-github-action-template#readme",
|
|
26
|
+
"funding": "https://github.com/CatChen/typescript-github-action-template?sponsor=1",
|
|
25
27
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@typescript-eslint/
|
|
29
|
-
"@
|
|
28
|
+
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
|
29
|
+
"@types/node": "^20.1.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
31
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
32
|
+
"@vercel/ncc": "^0.38.0",
|
|
30
33
|
"eslint": "^8.28.0",
|
|
31
|
-
"eslint-config-prettier": "^
|
|
32
|
-
"eslint-plugin-prettier": "^
|
|
34
|
+
"eslint-config-prettier": "^9.0.0",
|
|
35
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
33
36
|
"husky": "^8.0.2",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
+
"is-ci": "^3.0.1",
|
|
38
|
+
"lint-staged": "^14.0.0",
|
|
39
|
+
"prettier": "^3.0.2",
|
|
40
|
+
"typescript": "^5.0.2"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
43
|
"@actions/core": "^1.10.0",
|
|
40
44
|
"@actions/github": "^5.1.1"
|
|
45
|
+
},
|
|
46
|
+
"lint-staged": {
|
|
47
|
+
"*.(ts,js)": "yarn lint --fix",
|
|
48
|
+
"*.json": "yarn prettier -w",
|
|
49
|
+
"*.(yml,yaml)": "yarn prettier -w",
|
|
50
|
+
"*.(md,markdown)": "yarn prettier -w"
|
|
41
51
|
}
|
|
42
52
|
}
|