File tree Expand file tree Collapse file tree 2 files changed +94
-0
lines changed Expand file tree Collapse file tree 2 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
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+
13+ strategy :
14+ matrix :
15+ node-version : [18.x, 20.x]
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - uses : pnpm/action-setup@v2
21+ with :
22+ version : 8
23+
24+ - name : Use Node.js ${{ matrix.node-version }}
25+ uses : actions/setup-node@v4
26+ with :
27+ node-version : ${{ matrix.node-version }}
28+ cache : ' pnpm'
29+
30+ - name : Install dependencies
31+ run : pnpm install --frozen-lockfile
32+
33+ - name : Run linter
34+ run : pnpm lint:ci
35+
36+ - name : Run type check
37+ run : pnpm tsc
38+
39+ - name : Run tests
40+ run : pnpm test:ci
41+
42+ - name : Upload coverage reports
43+ uses : codecov/codecov-action@v3
44+ if : matrix.node-version == '20.x'
45+ with :
46+ file : ./coverage/clover.xml
47+ flags : unittests
48+ name : codecov-umbrella
49+
50+ - name : Build package
51+ run : pnpm build
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - ' v*'
8+
9+ jobs :
10+ release :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : write
14+ id-token : write
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - uses : pnpm/action-setup@v2
22+ with :
23+ version : 8
24+
25+ - uses : actions/setup-node@v4
26+ with :
27+ node-version : ' 20.x'
28+ registry-url : ' https://registry.npmjs.org'
29+ cache : ' pnpm'
30+
31+ - name : Install dependencies
32+ run : pnpm install --frozen-lockfile
33+
34+ - name : Run tests
35+ run : pnpm test:ci
36+
37+ - name : Build package
38+ run : pnpm build
39+
40+ - name : Publish to npm
41+ run : pnpm publish --no-git-checks --access public
42+ env :
43+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments