File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Setup Node.js
14+ uses : actions/setup-node@v4
15+ with :
16+ node-version : ' 20'
17+ registry-url : ' https://registry.npmjs.org'
18+
19+ - name : Install dependencies
20+ run : npm ci
21+
22+ - name : Build
23+ run : npm run build
24+
25+ - name : Publish to npm
26+ run : npm publish --access public
27+ env :
28+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Tests
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+ strategy :
13+ matrix :
14+ node-version : [18, 20, 22]
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Use Node.js ${{ matrix.node-version }}
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : ${{ matrix.node-version }}
23+
24+ - name : Install dependencies
25+ run : npm ci
26+
27+ - name : Build
28+ run : npm run build
29+
30+ - name : Run tests
31+ run : npm test
You can’t perform that action at this time.
0 commit comments