Skip to content

Commit 601f9ab

Browse files
CIで使用しているスクリプトをTypeScript化する (#1615)
* js -> ts * CIで使用しているスクリプトをTypeScript化する * dist反映 (#1616) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * package.jsonやpackage-lock.jsonを直してあげたよ! (#1638) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d870518 commit 601f9ab

19 files changed

+1197
-68
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/super-linter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
4848
with:
4949
cache: npm
50+
node-version-file: .node-version
5051
- run: bash "${GITHUB_WORKSPACE}/scripts/super_linter/build/set_path.sh"
5152
################################
5253
# Run Linter against code base #
@@ -58,8 +59,8 @@ jobs:
5859
DEFAULT_BRANCH: main
5960
LINTER_RULES_PATH: .
6061
VALIDATE_JSCPD: false
61-
JAVASCRIPT_DEFAULT_STYLE: prettier
62-
VALIDATE_JAVASCRIPT_STANDARD: false
62+
TYPESCRIPT_DEFAULT_STYLE: prettier
63+
VALIDATE_TYPESCRIPT_STANDARD: false
6364
concurrency:
6465
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
6566
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-gitleaks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2727
with:
2828
cache: npm
29+
node-version-file: .node-version
2930
- name: Install packages
3031
if: github.event_name != 'pull_request' || github.event.action != 'closed'
3132
run: npm ci

.github/workflows/update-package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2828
with:
2929
cache: npm
30+
node-version-file: .node-version
3031
- if: github.event_name != 'pull_request' || github.event.action != 'closed'
3132
run: npm install
3233
- uses: dev-hato/actions-diff-pr-management@8d475e5bc78f61c40024d4859b79134b66f788d2 # v1.2.1

.node-version

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

.prettierignore

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

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ runs:
1717
github-token: ${{inputs.github-token}}
1818
result-encoding: string
1919
script: |
20-
const script = require('${{ github.action_path }}/scripts/action/increment_version.js')
21-
return await script({github, context})
20+
const {script} = require('${{ github.action_path }}/dist/increment_version.js')
21+
return await script(github, context)
2222
- name: Create release
2323
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
2424
env:
@@ -27,5 +27,5 @@ runs:
2727
with:
2828
github-token: ${{inputs.github-token}}
2929
script: |
30-
const script = require('${{ github.action_path }}/scripts/action/create_release.js')
31-
return await script({github, context})
30+
const {script} = require('${{ github.action_path }}/dist/create_release.js')
31+
return await script(github, context)

dist/create_release.js

Lines changed: 44 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)