File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main, develop]
6+ pull_request :
7+ branches : [main, develop]
8+
9+ jobs :
10+ build :
11+ name : Build and Type Check
12+ runs-on : ubuntu-latest
13+
14+ strategy :
15+ matrix :
16+ node-version : [18.x, 20.x]
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Setup Node.js ${{ matrix.node-version }}
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : ${{ matrix.node-version }}
26+ cache : ' npm'
27+
28+ - name : Install dependencies
29+ run : npm ci --legacy-peer-deps || npm install --legacy-peer-deps
30+
31+ - name : Type check
32+ run : npm run typecheck
33+
34+ - name : Build
35+ run : npm run build
36+
37+ - name : Upload build artifacts
38+ if : matrix.node-version == '20.x'
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : build-artifacts
42+ path : dist/
43+ retention-days : 7
Original file line number Diff line number Diff line change 1+ name : Code Quality
2+
3+ on :
4+ pull_request :
5+ branches : [main, develop]
6+
7+ jobs :
8+ dependency-review :
9+ name : Dependency Review
10+ runs-on : ubuntu-latest
11+ if : github.event_name == 'pull_request'
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Dependency Review
18+ uses : actions/dependency-review-action@v4
19+ with :
20+ fail-on-severity : moderate
21+
22+ codeql :
23+ name : CodeQL Security Analysis
24+ runs-on : ubuntu-latest
25+
26+ permissions :
27+ security-events : write
28+ actions : read
29+ contents : read
30+
31+ steps :
32+ - name : Checkout code
33+ uses : actions/checkout@v4
34+
35+ - name : Initialize CodeQL
36+ uses : github/codeql-action/init@v3
37+ with :
38+ languages : typescript, javascript
39+
40+ - name : Autobuild
41+ uses : github/codeql-action/autobuild@v3
42+
43+ - name : Perform CodeQL Analysis
44+ uses : github/codeql-action/analyze@v3
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+ workflow_dispatch :
8+
9+ jobs :
10+ release :
11+ name : Build and Release
12+ runs-on : ubuntu-latest
13+
14+ permissions :
15+ contents : write
16+ packages : write
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Setup Node.js
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : ' 20.x'
26+ cache : ' npm'
27+ registry-url : ' https://registry.npmjs.org'
28+
29+ - name : Install dependencies
30+ run : npm ci --legacy-peer-deps || npm install --legacy-peer-deps
31+
32+ - name : Type check
33+ run : npm run typecheck
34+
35+ - name : Build
36+ run : npm run build
37+
38+ - name : Create GitHub Release
39+ uses : softprops/action-gh-release@v1
40+ if : startsWith(github.ref, 'refs/tags/')
41+ with :
42+ draft : false
43+ generate_release_notes : true
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+
47+ # Uncomment when ready to publish to npm
48+ # - name: Publish to npm
49+ # if: startsWith(github.ref, 'refs/tags/')
50+ # run: npm publish --access public
51+ # env:
52+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments