File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Package and Publish to NPM
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+
8+ jobs :
9+ npm-tests :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ node-version : [16.x, 18.x, 20.x]
14+ # See supported Node.js release schedule at
15+ # https://nodejs.org/en/about/releases/
16+ defaults :
17+ run :
18+ working-directory : chartlets.js
19+
20+ steps :
21+ - uses : actions/checkout@v3
22+ - name : Use Node.js ${{ matrix.node-version }}
23+ uses : actions/setup-node@v3
24+ with :
25+ node-version : ${{ matrix.node-version }}
26+ cache : ' npm'
27+ cache-dependency-path : chartlets.js/package-lock.json
28+
29+ - run : npm ci
30+ - run : npm run lint
31+ - run : npm run build
32+ - run : npm run test
33+
34+ npm-deploy :
35+ name : Publish TS-React Package to npmjs
36+ runs-on : ubuntu-latest
37+ needs : npm-tests
38+ defaults :
39+ run :
40+ working-directory : chartlets.js
41+
42+ steps :
43+ - uses : actions/checkout@v4
44+
45+ - name : Set up Node.js
46+ uses : actions/setup-node@v4
47+ with :
48+ node-version : ' 18.x'
49+ registry-url : ' https://registry.npmjs.org'
50+ cache : ' npm'
51+ cache-dependency-path : chartlets.js/package-lock.json
52+
53+ - run : npm ci
54+ - run : npm run build
55+ - run : npm publish --access public
56+ env :
57+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments