Skip to content

Commit 4c9ac28

Browse files
massongitdev-hato-app[bot]github-actions[bot]
authored
CIで使用しているスクリプトをTypeScript化する (#1156)
* js -> ts * CIで使用しているスクリプトをTypeScript化する * formatが間違ってたので直してあげたよ! (#1157) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * package.jsonやpackage-lock.jsonを直してあげたよ! (#1158) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * dist反映 (#1159) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * package.jsonやpackage-lock.jsonを直してあげたよ! (#1202) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: dev-hato-app[bot] <111467236+dev-hato-app[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 51ef34f commit 4c9ac28

File tree

16 files changed

+1685
-77
lines changed

16 files changed

+1685
-77
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/** linguist-generated=true

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
paths:
88
- .github/workflows/create-release.yml
9-
- scripts/action/**
9+
- dist/**
1010
- action.yml
1111
permissions:
1212
contents: write

.github/workflows/github-actions-cache-cleaner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
pull_request:
1111
paths:
1212
- .github/workflows/github-actions-cache-cleaner.yml
13-
- scripts/action/**
13+
- dist/**
1414
- action.yml
1515
permissions: read-all
1616
jobs:

.github/workflows/super-linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ jobs:
5959
DEFAULT_BRANCH: main
6060
LINTER_RULES_PATH: .
6161
VALIDATE_JSCPD: false
62-
JAVASCRIPT_DEFAULT_STYLE: prettier
63-
VALIDATE_JAVASCRIPT_STANDARD: false
62+
TYPESCRIPT_DEFAULT_STYLE: prettier
63+
VALIDATE_TYPESCRIPT_STANDARD: false
6464
concurrency:
6565
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
6666
cancel-in-progress: true

.github/workflows/update-dist.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: update-dist
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- closed
10+
push:
11+
branches:
12+
- main
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
jobs:
17+
update-dist:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
21+
with:
22+
fetch-depth: 0
23+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
24+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
25+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
26+
with:
27+
cache: npm
28+
node-version-file: .node-version
29+
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
30+
run: bash "${GITHUB_WORKSPACE}/scripts/update_dist/update_dist/build.sh"
31+
- uses: dev-hato/actions-diff-pr-management@e5c78b251a69f44f93b2f1398e06b129bcf151ec # v1.2.0
32+
with:
33+
github-token: ${{secrets.GITHUB_TOKEN}}
34+
branch-name-prefix: apply-dist
35+
pr-title-prefix: dist反映
36+
pr-description-prefix: srcの内容をdistに反映します。
37+
concurrency:
38+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
39+
cancel-in-progress: true

.github/workflows/update-readme.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ jobs:
3939
github-token: ${{secrets.GITHUB_TOKEN}}
4040
result-encoding: string
4141
script: |
42-
const script = require('./scripts/update_readme/update_readme/get_inputs_markdown.js')
42+
const {tsImport} = require('tsx/esm/api')
43+
const {script} = await tsImport(
44+
'./scripts/update_readme/update_readme/get_inputs_markdown.ts',
45+
process.env.GITHUB_WORKSPACE + '/'
46+
)
4347
return script()
4448
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
4549
env:

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ runs:
1212
with:
1313
github-token: ${{inputs.github-token}}
1414
script: |
15-
const script = require('${{ github.action_path }}/scripts/action/clean-cache.js')
16-
await script({github, context})
15+
const {script} = require('${{ github.action_path }}/dist/clean-cache.js')
16+
await script(github, context)

dist/clean-cache.js

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

0 commit comments

Comments
 (0)