Skip to content

Commit c68af44

Browse files
committed
feat!: drop node 18
1 parent 65d4855 commit c68af44

File tree

4 files changed

+21
-99
lines changed

4 files changed

+21
-99
lines changed

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,17 @@ jobs:
88
gh-pages:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v5
12-
- name: Set node
13-
uses: actions/setup-node@v6
14-
with:
15-
node-version: lts/*
16-
17-
- name: Setup
18-
run: npm i -g @antfu/ni
19-
20-
- name: Install
21-
run: nci
11+
- name: Setup JS
12+
uses: sxzz/workflows/setup-js@v1
2213

2314
- name: Build
24-
run: nr build
15+
run: pnpm build
2516

2617
- name: Install Example Dependencies & Build
2718
run: pnpm -C examples/vite run build
2819

2920
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v4
21+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
3122
with:
3223
github_token: ${{ secrets.GITHUB_TOKEN }}
3324
publish_dir: ./examples/vite/dist

.github/workflows/release.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,13 @@ name: Release
33
on:
44
push:
55
tags:
6-
- 'v**'
7-
workflow_dispatch:
6+
- 'v*'
87

98
jobs:
10-
publish:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v5
14-
with:
15-
fetch-depth: 0
16-
17-
- name: Set node
18-
uses: actions/setup-node@v6
19-
with:
20-
node-version: lts/*
21-
registry-url: https://registry.npmjs.com/
22-
23-
- name: Setup
24-
run: npm i -g @antfu/ni
25-
26-
- name: Install
27-
run: nci
28-
29-
- name: Build
30-
run: nr build
31-
32-
- name: Publish
33-
run: npm publish
34-
env:
35-
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
36-
37-
- run: npx changelogithub
38-
env:
39-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
9+
release:
10+
uses: sxzz/workflows/.github/workflows/release.yml@v1
11+
with:
12+
publish: true
13+
permissions:
14+
contents: write
15+
id-token: write

.github/workflows/unit-test.yml

Lines changed: 8 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,14 @@ name: Unit Test
22

33
on:
44
push:
5-
branches:
6-
- main
7-
5+
branches: [main]
86
pull_request:
9-
branches:
10-
- main
11-
12-
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v5
17-
- name: Set node
18-
uses: actions/setup-node@v6
19-
with:
20-
node-version: lts/*
21-
22-
- name: Setup
23-
run: npm i -g @antfu/ni
24-
25-
- name: Install
26-
run: nci
27-
28-
- name: Lint
29-
run: nr lint
30-
31-
test:
32-
runs-on: ${{ matrix.os }}
7+
branches: [main]
338

34-
strategy:
35-
matrix:
36-
os: [ubuntu-latest, windows-latest]
37-
node: [18, 20, 22]
38-
fail-fast: false
9+
permissions: {}
3910

40-
steps:
41-
- uses: actions/checkout@v5
42-
- name: Set node ${{ matrix.node }}
43-
uses: actions/setup-node@v6
44-
with:
45-
node-version: ${{ matrix.node }}
46-
47-
- name: Setup
48-
run: npm i -g @antfu/ni
49-
50-
- name: Install
51-
run: nci
52-
53-
- name: Build
54-
run: nr build
55-
56-
- name: Test
57-
run: nr test
58-
59-
- name: Build Examples
60-
run: pnpm build:examples
11+
jobs:
12+
unit-test:
13+
uses: sxzz/workflows/.github/workflows/unit-test.yml@v1
14+
with:
15+
test: pnpm run test && pnpm build:examples

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"vitest": "^4.0.6"
8686
},
8787
"engines": {
88-
"node": ">=18.12.0"
88+
"node": ">=20.19.0"
8989
},
9090
"prettier": "@sxzz/prettier-config"
9191
}

0 commit comments

Comments
 (0)