-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.09 KB
/
checks.yml
File metadata and controls
41 lines (33 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Checks (Lint, Test, Build)
on:
pull_request:
push:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "npm"
- run: npm ci
- name: Run build
run: npm run build
- name: Check build output
run: |
if [ ! -d "dist" ]; then
echo "Build failed: dist directory not found"
exit 1
fi
if [ ! -f "dist/index.js" ] || [ ! -f "dist/index.esm.js" ] || [ ! -f "dist/index.d.ts" ]; then
echo "Build failed: required files not found in dist"
exit 1
fi
echo "Build successful: all required files present"