typescript-github-action-template 0.1.17 → 0.1.19

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/README.md CHANGED
@@ -1,3 +1,11 @@
1
- # typescript-github-action-template
1
+ # Typescript GitHub Action Template
2
2
 
3
3
  A template to create custom GitHub Action with TypeScript/JavaScript.
4
+
5
+ ## Secrets
6
+
7
+ The following secrets need to be set up before you can use workflows already defined in this template:
8
+
9
+ - **`CHECK_GIT_STATUS_BOT_APP_ID`** and **`CHECK_GIT_STATUS_BOT_APP_PRIVATE_KEY`**: Used by the [`Build` workflow](https://github.com/CatChen/typescript-github-action-template/blob/main/.github/workflows/build.yml). If you don't want to set up a bot you can remove the `actions/create-github-app-token` step and remove all references to `steps.get-github-app-token.outputs.token`.
10
+ - **`ACCEPT_TO_SHIP_BOT_APP_ID`** and **`ACCEPT_TO_SHIP_BOT_APP_PRIVATE_KEY`**: Used by the [`Ship` workflow](https://github.com/CatChen/typescript-github-action-template/blob/main/.github/workflows/ship.yml). If you don't want to set up a bot you can remove the two `actions/create-github-app-token` steps and remove all references to `steps.get-github-app-token.outputs.token`.
11
+ - **`NPM_TOKEN`**: Used by the [`Release` workflow](https://github.com/CatChen/typescript-github-action-template/blob/main/.github/workflows/release.yml). This is necessary for publishing the NPM package to NPM. If you don't want to publish to NPM you can remove the `publish` job.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typescript-github-action-template",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
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,8 +10,10 @@
10
10
  "package": "rm -rf dist && yarn ncc build src/index.ts --external eslint --source-map --license licenses.txt",
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "lint": "eslint -c eslint.config.js",
13
- "postinstall": "is-ci || husky install",
14
- "preversion": "rm -rf lib && rm -rf dist && yarn && yarn build && yarn package"
13
+ "_postinstall": "is-ci || husky install",
14
+ "prepublishOnly": "pinst --disable",
15
+ "postpublish": "pinst --enable",
16
+ "preversion": "yarn && yarn build && yarn package"
15
17
  },
16
18
  "repository": {
17
19
  "type": "git",
@@ -27,7 +29,7 @@
27
29
  "devDependencies": {
28
30
  "@eslint/eslintrc": "^3.0.2",
29
31
  "@eslint/js": "^9.2.0",
30
- "@trivago/prettier-plugin-sort-imports": "^4.0.0",
32
+ "@serverless-guru/prettier-plugin-import-order": "^0.4.2",
31
33
  "@types/node": "^20.1.0",
32
34
  "@typescript-eslint/eslint-plugin": "^7.0.1",
33
35
  "@typescript-eslint/parser": "^7.0.1",
@@ -38,6 +40,7 @@
38
40
  "husky": "^9.0.5",
39
41
  "is-ci": "^3.0.1",
40
42
  "lint-staged": "^15.0.2",
43
+ "pinst": "^3.0.0",
41
44
  "prettier": "^3.0.2",
42
45
  "typescript": "^5.0.2",
43
46
  "typescript-eslint": "^7.8.0"
package/.prettierrc.json DELETED
@@ -1,21 +0,0 @@
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
- }
@@ -1,11 +0,0 @@
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/eslint.config.js DELETED
@@ -1,45 +0,0 @@
1
- import js from '@eslint/js';
2
- import { FlatCompat } from '@eslint/eslintrc';
3
- import path from 'path';
4
- import { fileURLToPath } from 'url';
5
- import ts from 'typescript-eslint';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
-
10
- const compat = new FlatCompat({
11
- baseDirectory: __dirname,
12
- resolvePluginsRelativeTo: __dirname,
13
- recommendedConfig: js.configs.recommended,
14
- });
15
-
16
- export default ts.config(
17
- ...compat.config({
18
- env: {
19
- browser: true,
20
- es2022: true,
21
- node: true,
22
- },
23
- extends: ['eslint:recommended', 'plugin:prettier/recommended'],
24
- parser: '@typescript-eslint/parser',
25
- parserOptions: {
26
- project: './tsconfig.json',
27
- ecmaVersion: 'latest',
28
- sourceType: 'module',
29
- },
30
- root: true,
31
- rules: {},
32
- ignorePatterns: [
33
- 'node_modules/**/*',
34
- 'lib/**/*',
35
- 'dist/**/*',
36
- 'eslint.config.js',
37
- ],
38
- overrides: [
39
- {
40
- files: ['*.ts'],
41
- },
42
- ],
43
- }),
44
- ...ts.configs.recommendedTypeChecked,
45
- );