Skip to content

Commit acdcf08

Browse files
committed
#158 update github actions
1 parent f663936 commit acdcf08

3 files changed

Lines changed: 20 additions & 13 deletions

File tree

.github/workflows/integration.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ name: Integration UnitTest
33
on:
44
push:
55
branches:
6-
- main
76
- develop
87
pull_request:
98
branches:
109
- main
1110
- develop
11+
workflow_call:
1212

1313
jobs:
1414
macos-browser-test:
1515
runs-on: macos-latest
1616
permissions:
1717
contents: read
18-
pull-requests: write
1918
steps:
2019
- uses: actions/setup-node@v6
2120
with:
@@ -26,14 +25,13 @@ jobs:
2625
repository: Next2D/player
2726
ref: main
2827
- run: npm install -g npm@latest
29-
- run: npm install
28+
- run: npm ci
3029
- run: npm run test
3130

3231
windows-browser-test:
3332
runs-on: windows-latest
3433
permissions:
3534
contents: read
36-
pull-requests: write
3735
steps:
3836
- uses: actions/setup-node@v6
3937
with:
@@ -44,5 +42,5 @@ jobs:
4442
repository: Next2D/player
4543
ref: main
4644
- run: npm install -g npm@latest
47-
- run: npm install
45+
- run: npm ci
4846
- run: npm run test

.github/workflows/lint.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,38 @@ name: Lint
33
on:
44
push:
55
branches:
6-
- main
76
- develop
87
pull_request:
98
branches:
109
- main
1110
- develop
11+
workflow_call:
1212

1313
jobs:
1414
macos-browser-test:
1515
runs-on: macos-latest
1616
permissions:
1717
contents: read
18-
pull-requests: write
1918
steps:
2019
- uses: actions/checkout@v6
2120
- uses: actions/setup-node@v6
2221
with:
2322
node-version: 24
2423
registry-url: "https://registry.npmjs.org"
2524
- run: npm install -g npm@latest
26-
- run: npm install
27-
- run: npx eslint ./src/**/*.ts
25+
- run: npm ci
26+
- run: npm run lint
2827

2928
windows-browser-test:
3029
runs-on: windows-latest
3130
permissions:
3231
contents: read
33-
pull-requests: write
3432
steps:
3533
- uses: actions/checkout@v6
3634
- uses: actions/setup-node@v6
3735
with:
3836
node-version: 24
3937
registry-url: "https://registry.npmjs.org"
4038
- run: npm install -g npm@latest
41-
- run: npm install
42-
- run: npx eslint ./src/**/*.ts
39+
- run: npm ci
40+
- run: npm run lint

.github/workflows/publish.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,19 @@ permissions:
1010
contents: read
1111

1212
jobs:
13+
lint:
14+
uses: ./.github/workflows/lint.yml
15+
16+
integration:
17+
uses: ./.github/workflows/integration.yml
18+
1319
publish:
20+
needs: [lint, integration]
1421
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: write
25+
id-token: write
1526
steps:
1627
- uses: actions/checkout@v6
1728
- uses: actions/setup-node@v6
@@ -20,7 +31,7 @@ jobs:
2031
registry-url: "https://registry.npmjs.org"
2132
- run: npm install -g npm@latest
2233
- run: npm run create:package
23-
- run: npm install
34+
- run: npm ci
2435
- run: npm run release
2536
- run: npm publish
2637
working-directory: ./dist

0 commit comments

Comments
 (0)