File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on : ["push", "pull_request"]
4+
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ strategy :
9+ matrix :
10+ node-version : [16.x]
11+ steps :
12+ - uses : actions/checkout@v3
13+ - name : Use Node.js ${{ matrix.node-version }}
14+ uses : actions/setup-node@v3
15+ with :
16+ node-version : ${{ matrix.node-version }}
17+ cache : ' npm'
18+ - run : npm ci
19+ - run : npm run prepublishOnly
Original file line number Diff line number Diff line change 1+ name : Publish to npmjs
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ - uses : actions/setup-node@v3
13+ with :
14+ node-version : 16
15+ - run : npm ci
16+ - run : npm run lint
17+
18+ publish-npm :
19+ needs : build
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v3
23+ - uses : actions/setup-node@v3
24+ with :
25+ node-version : 16
26+ registry-url : https://registry.npmjs.org/
27+ - run : npm ci
28+ - run : npm publish
29+ env :
30+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
You can’t perform that action at this time.
0 commit comments