File tree Expand file tree Collapse file tree 2 files changed +34
-13
lines changed Expand file tree Collapse file tree 2 files changed +34
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Setup and build
2
+ description : Generic setup action for actions
3
+ inputs :
4
+ node-version :
5
+ required : false
6
+ description : Node version for setup-node
7
+ default : 20.x
8
+
9
+ runs :
10
+ using : composite
11
+
12
+ steps :
13
+ - name : Set node version to ${{ inputs.node-version }}
14
+ uses : actions/setup-node@v4
15
+ with :
16
+ node-version : ${{ inputs.node-version }}
17
+
18
+ - name : Install pnpm
19
+ uses : pnpm/action-setup@v2
20
+
21
+ - name : Install & Build
22
+ shell : bash
23
+ run : |
24
+ pnpm install
25
+ pnpm build
Original file line number Diff line number Diff line change 1
1
name : CI
2
+
2
3
on :
3
4
push :
4
5
branches :
5
6
- main
6
7
pull_request :
8
+
7
9
jobs :
8
10
test :
9
11
name : Test
@@ -21,17 +23,14 @@ jobs:
21
23
steps :
22
24
- name : Checkout
23
25
uses : actions/checkout@v4
24
- - uses : actions/setup-node@v4
26
+
27
+ - uses : ./.github/actions/setup-and-build
25
28
with :
26
29
node-version : ${{ matrix.node-version }}
27
- - name : Setup
28
- uses : pnpm/action-setup@v4
29
- - name : Install dependencies
30
- run : pnpm install
30
+
31
31
- name : Lint
32
32
run : pnpm lint
33
- - name : Build
34
- run : pnpm build
33
+
35
34
- name : Test
36
35
run : pnpm test
37
36
41
40
steps :
42
41
- name : Checkout
43
42
uses : actions/checkout@v4
44
- - name : Setup
45
- uses : pnpm/action-setup@v4
46
- - name : Install dependencies
47
- run : pnpm install
48
- - name : Build
49
- run : pnpm build
43
+
44
+ - uses : ./.github/actions/setup-and-build
45
+
50
46
- name : Build docs
51
47
run : |
52
48
pnpm run docs:build
You can’t perform that action at this time.
0 commit comments