File tree Expand file tree Collapse file tree 5 files changed +1663
-731
lines changed Expand file tree Collapse file tree 5 files changed +1663
-731
lines changed Original file line number Diff line number Diff line change
1
+ name : CI/CD
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ branches : [main]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ - name : Use Node.js
15
+ uses : actions/setup-node@v2
16
+ with :
17
+ node-version : ' 14.x'
18
+ - run : npm ci
19
+ - run : npm run build
20
+ - run : npm test
21
+
22
+ lint :
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - uses : actions/checkout@v2
26
+ - name : Use Node.js
27
+ uses : actions/setup-node@v2
28
+ with :
29
+ node-version : ' 14.x'
30
+ - run : npm ci
31
+ - run : npm run lint
32
+
33
+ deploy :
34
+ needs : [test, lint]
35
+ runs-on : ubuntu-latest
36
+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
37
+ steps :
38
+ - uses : actions/checkout@v2
39
+ - name : Use Node.js
40
+ uses : actions/setup-node@v2
41
+ with :
42
+ node-version : ' 14.x'
43
+ - run : npm ci
44
+ - run : npm run build
45
+ - name : Deploy to npm
46
+ run : |
47
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
48
+ npm publish
49
+ env :
50
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -66,4 +66,6 @@ jspm_packages/
66
66
.parcel-cache
67
67
68
68
# Next.js build output
69
- .next
69
+ .next
70
+
71
+ .npmrc
You can’t perform that action at this time.
0 commit comments