@@ -13,47 +13,57 @@ jobs:
13
13
runs-on : ubuntu-latest
14
14
strategy :
15
15
matrix :
16
- node : ['14 .x', '16 .x']
16
+ node : ['18 .x', '20 .x']
17
17
18
18
steps :
19
19
- name : Checkout repo
20
- uses : actions/checkout@v2
20
+ uses : actions/checkout@v4
21
21
22
- - name : Use Node ${{ matrix.node }}
23
- uses : actions/setup-node@v1
22
+ - name : Setup PNPM
23
+ uses : pnpm/action-setup@v4
24
+
25
+ - name : Install Node.js ${{ matrix.node }}
26
+ uses : actions/setup-node@v4
24
27
with :
25
28
node-version : ${{ matrix.node }}
26
-
27
- - name : Install deps and build (with cache)
28
- uses : bahmutov/npm-install@v1
29
+ cache : " pnpm"
30
+
31
+ - name : Install dependencies
32
+ shell : bash
33
+ run : pnpm install
29
34
30
35
- name : Lint
31
- run : yarn lint --quiet
36
+ run : pnpm lint --quiet
32
37
33
38
- name : Test
34
- run : yarn test:coverage
39
+ run : pnpm test:coverage
35
40
36
41
- name : Build
37
- run : yarn build
42
+ run : pnpm build
38
43
39
44
test-and-publish :
40
45
name : 🎉 Publish to NPM
41
46
needs : [build]
42
47
if : github.repository == 'quran/api-js' && (github.ref == 'refs/heads/master') && github.event_name != 'pull_request'
43
48
runs-on : ubuntu-latest
44
49
steps :
45
- - uses : actions/checkout@v2
50
+ - uses : actions/checkout@v4
51
+
52
+ - name : Setup PNPM
53
+ uses : pnpm/action-setup@v4
46
54
47
- - uses : actions/setup-node@v2
55
+ - uses : actions/setup-node@v4
48
56
with :
49
- node-version : 14
57
+ node-version : 20
50
58
registry-url : https://registry.npmjs.org/
59
+ cache : " pnpm"
51
60
52
- - name : Install deps (with cache)
53
- uses : bahmutov/npm-install@v1
61
+ - name : Install dependencies
62
+ shell : bash
63
+ run : pnpm install
54
64
55
65
- name : Build
56
- run : yarn build
66
+ run : pnpm build
57
67
58
68
- run : npx semantic-release@17
59
69
env :
0 commit comments