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 : Build on PR Merge
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch : # Allow manual triggering
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : ' 20'
21+ cache : ' npm'
22+
23+ - name : Install dependencies
24+ run : npm install
25+
26+ - name : Install TypeScript
27+ run : npm install -g typescript
28+
29+ - name : Run build script
30+ run : npm run build
31+
32+ - name : Verify build output
33+ run : |
34+ if [ ! -f "dist/index.js" ]; then
35+ echo "Build failed - dist/index.js not found"
36+ exit 1
37+ fi
38+ echo "Build successful - dist/index.js created"
39+
40+ - name : Upload build artifacts
41+ uses : actions/upload-artifact@v4
42+ with :
43+ name : dist
44+ path : dist/
45+ retention-days : 30
You can’t perform that action at this time.
0 commit comments