@@ -3,55 +3,73 @@ name: ci
33on : [push]
44
55jobs :
6- compile :
7- runs-on : ubuntu-latest
8-
9- steps :
10- - name : Checkout repo
11- uses : actions/checkout@v4
12-
13- - name : Set up node
14- uses : actions/setup-node@v3
15-
16- - name : Compile
17- run : yarn && yarn build
18-
19- test :
20- runs-on : ubuntu-latest
21-
22- steps :
23- - name : Checkout repo
24- uses : actions/checkout@v4
25-
26- - name : Set up node
27- uses : actions/setup-node@v3
28-
29- - name : Compile
30- run : yarn && yarn test
31-
32- publish :
33- needs : [ compile, test ]
34- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
35- runs-on : ubuntu-latest
36- steps :
37- - name : Checkout repo
38- uses : actions/checkout@v4
39- - name : Set up node
40- uses : actions/setup-node@v3
41- - name : Install dependencies
42- run : yarn install
43- - name : Build
44- run : yarn build
45-
46- - name : Publish to npm
47- run : |
48- npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
49- if [[ ${GITHUB_REF} == *alpha* ]]; then
50- npm publish --access public --tag alpha
51- elif [[ ${GITHUB_REF} == *beta* ]]; then
52- npm publish --access public --tag beta
53- else
54- npm publish --access public
55- fi
56- env :
57- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
6+ compile :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - name : Checkout repo
11+ uses : actions/checkout@v4
12+
13+ - name : Set up node
14+ uses : actions/setup-node@v3
15+
16+ - name : Install pnpm
17+ uses : pnpm/action-setup@v4
18+
19+ - name : Install dependencies
20+ run : pnpm install
21+
22+ - name : Compile
23+ run : pnpm build
24+
25+ test :
26+ runs-on : ubuntu-latest
27+
28+ steps :
29+ - name : Checkout repo
30+ uses : actions/checkout@v4
31+
32+ - name : Set up node
33+ uses : actions/setup-node@v3
34+
35+ - name : Install pnpm
36+ uses : pnpm/action-setup@v4
37+
38+ - name : Install dependencies
39+ run : pnpm install
40+
41+ - name : Test
42+ run : pnpm test
43+
44+ publish :
45+ needs : [compile, test]
46+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
47+ runs-on : ubuntu-latest
48+ steps :
49+ - name : Checkout repo
50+ uses : actions/checkout@v4
51+
52+ - name : Set up node
53+ uses : actions/setup-node@v3
54+
55+ - name : Install pnpm
56+ uses : pnpm/action-setup@v4
57+
58+ - name : Install dependencies
59+ run : pnpm install
60+
61+ - name : Build
62+ run : pnpm build
63+
64+ - name : Publish to npm
65+ run : |
66+ npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
67+ if [[ ${GITHUB_REF} == *alpha* ]]; then
68+ npm publish --access public --tag alpha
69+ elif [[ ${GITHUB_REF} == *beta* ]]; then
70+ npm publish --access public --tag beta
71+ else
72+ npm publish --access public
73+ fi
74+ env :
75+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments