Skip to content

Commit ac05d9b

Browse files
authored
ci: use node 20.x (#78)
1 parent 94d0805 commit ac05d9b

4 files changed

Lines changed: 23 additions & 25 deletions

File tree

.github/workflows/release-next.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [16.x]
19+
node-version: [20.x]
2020

2121
steps:
2222
# 判断用户是否有写权限
2323
- name: 'Check if user has write access'
24-
uses: 'lannonbr/repo-permission-check-action@2.0.0'
24+
uses: 'opensumi/actions/permission-check@main'
2525
with:
2626
permission: 'write'
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929

3030
# Checkout to specific branch
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
with:
3333
ref: ${{ github.event.inputs.ref }}
3434
token: ${{ secrets.GITHUB_TOKEN }}
3535

3636
- name: Use Node.js ${{ matrix.node-version }}
37-
uses: actions/setup-node@v3
37+
uses: actions/setup-node@v4
3838
with:
3939
node-version: ${{ matrix.node-version }}
4040
registry-url: 'https://registry.npmjs.org'
@@ -43,11 +43,11 @@ jobs:
4343
id: yarn_cache_dir_path
4444
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
4545

46-
- uses: actions/cache@v3
46+
- uses: actions/cache@v4
4747
id: yarn_cache
4848
with:
4949
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
50-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
5151
restore-keys: |
5252
${{ runner.os }}-yarn-
5353
@@ -56,7 +56,6 @@ jobs:
5656
run: |
5757
yarn install --immutable
5858
yarn run init
59-
yarn run build:all
6059
6160
- name: Setup .yarnrc.yml
6261
run: |
@@ -92,4 +91,4 @@ jobs:
9291
cat $GITHUB_STEP_SUMMARY >> $GITHUB_ENV
9392
echo 'EOF' >> $GITHUB_ENV
9493
env:
95-
INPUT_REF: ${{ github.event.inputs.ref }}
94+
INPUT_REF: ${{ github.event.inputs.ref }}

.github/workflows/release-rc.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [16.x]
19+
node-version: [20.x]
2020

2121
steps:
2222
# 判断用户是否有写权限
2323
- name: 'Check if user has write access'
24-
uses: 'lannonbr/repo-permission-check-action@2.0.0'
24+
uses: 'opensumi/actions/permission-check@main'
2525
with:
2626
permission: 'write'
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929

3030
# Checkout to specific branch
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
with:
3333
ref: ${{ github.event.inputs.ref }}
3434
token: ${{ secrets.GITHUB_TOKEN }}
3535

3636
- name: Use Node.js ${{ matrix.node-version }}
37-
uses: actions/setup-node@v3
37+
uses: actions/setup-node@v4
3838
with:
3939
node-version: ${{ matrix.node-version }}
4040
registry-url: 'https://registry.npmjs.org'
@@ -43,11 +43,11 @@ jobs:
4343
id: yarn_cache_dir_path
4444
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
4545

46-
- uses: actions/cache@v3
46+
- uses: actions/cache@v4
4747
id: yarn_cache
4848
with:
4949
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
50-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
5151
restore-keys: |
5252
${{ runner.os }}-yarn-
5353
@@ -56,7 +56,6 @@ jobs:
5656
run: |
5757
yarn install --immutable
5858
yarn run init
59-
yarn run build:all
6059
6160
- name: Setup .yarnrc.yml
6261
run: |
@@ -92,4 +91,4 @@ jobs:
9291
cat $GITHUB_STEP_SUMMARY >> $GITHUB_ENV
9392
echo 'EOF' >> $GITHUB_ENV
9493
env:
95-
INPUT_REF: ${{ github.event.inputs.ref }}
94+
INPUT_REF: ${{ github.event.inputs.ref }}

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
environment: latest
2020
strategy:
2121
matrix:
22-
node-version: [16.x]
22+
node-version: [20.x]
2323

2424
steps:
2525
# 判断用户是否有管理员权限
@@ -31,20 +31,21 @@ jobs:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232

3333
- name: Checkout
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535
with:
3636
token: ${{ secrets.GITHUB_TOKEN }}
3737

3838
- name: Use Node.js ${{ matrix.node-version }}
39-
uses: actions/setup-node@v3
39+
uses: actions/setup-node@v4
4040
with:
4141
node-version: ${{ matrix.node-version }}
4242
registry-url: 'https://registry.npmjs.org'
4343

44-
- uses: mukunku/tag-exists-action@v1.0.0
44+
- uses: mukunku/tag-exists-action@v1.6.0
4545
id: checkTag
46+
with:
47+
tag: v${{github.event.inputs.version}}
4648
env:
47-
TAG: v${{github.event.inputs.version}}
4849
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4950

5051
- name: Git Identity
@@ -60,11 +61,11 @@ jobs:
6061
id: yarn_cache_dir_path
6162
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
6263

63-
- uses: actions/cache@v3
64+
- uses: actions/cache@v4
6465
id: yarn_cache
6566
with:
6667
path: ${{ steps.yarn_cache_dir_path.outputs.dir }}
67-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
68+
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
6869
restore-keys: |
6970
${{ runner.os }}-yarn-
7071
@@ -74,7 +75,6 @@ jobs:
7475
run: |
7576
yarn install --immutable
7677
yarn run init
77-
yarn run build:all
7878
yarn run update-package -v ${{ github.event.inputs.version }}
7979
8080
- name: Setup .yarnrc.yml

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prepare": "husky install",
1515
"type-check": "tsc --skipLibCheck --noEmit",
1616
"preinstall": "node scripts/preinstall",
17-
"init": "npm run clean && npm run generate && npm run build",
17+
"init": "npm run clean && npm run generate && npm run build:all",
1818
"start": "npm run dev",
1919
"generate": "node scripts/generate",
2020
"editor": "INTEGRATION=editor npm run dev",

0 commit comments

Comments
 (0)