|
8 | 8 | - "main" |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - build: |
12 | | - runs-on: ubuntu-latest |
13 | | - steps: |
14 | | - - uses: actions/checkout@v4 |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v4 |
15 | 15 |
|
16 | | - - name: Setup pnpm |
17 | | - uses: pnpm/action-setup@v4 |
18 | | - with: |
19 | | - version: 10.25.0 |
20 | | - run_install: false |
| 16 | + - name: Setup pnpm |
| 17 | + uses: pnpm/action-setup@v4 |
| 18 | + with: |
| 19 | + version: 10.25.0 |
| 20 | + run_install: false |
21 | 21 |
|
22 | | - - name: Setup Node.js |
23 | | - uses: actions/setup-node@v4 |
24 | | - with: |
25 | | - node-version: 22.x |
26 | | - cache: 'pnpm' |
| 22 | + - name: Setup Node.js |
| 23 | + uses: actions/setup-node@v4 |
| 24 | + with: |
| 25 | + node-version: 22.x |
| 26 | + cache: "pnpm" |
27 | 27 |
|
28 | | - - name: Install build dependencies |
29 | | - run: | |
30 | | - sudo apt-get update |
31 | | - sudo apt-get install -y build-essential python3 |
| 28 | + - name: Install build dependencies |
| 29 | + run: | |
| 30 | + sudo apt-get update |
| 31 | + sudo apt-get install -y build-essential python3 |
32 | 32 |
|
33 | | - - name: Setup environment variables |
34 | | - run: | |
35 | | - # Always copy .env.example to .env before builds to ensure env vars are available |
36 | | - # Root level .env |
37 | | - if [ -f .env.example ]; then |
38 | | - cp .env.example .env |
39 | | - echo "✅ Created root .env from .env.example" |
40 | | - else |
41 | | - echo "⚠️ Warning: root .env.example not found, creating minimal .env" |
42 | | - touch .env |
43 | | - fi |
44 | | - |
45 | | - # Package-level .env files (e.g., blabsy) |
46 | | - for dir in platforms/* infrastructure/*; do |
47 | | - if [ -d "$dir" ] && [ -f "$dir/.env.example" ]; then |
48 | | - cp "$dir/.env.example" "$dir/.env" |
49 | | - echo "✅ Created $dir/.env from $dir/.env.example" |
50 | | - fi |
51 | | - done |
| 33 | + - name: Setup environment variables |
| 34 | + run: | |
| 35 | + # Always copy .env.example to .env before builds to ensure env vars are available |
| 36 | + # Root level .env |
| 37 | + if [ -f .env.example ]; then |
| 38 | + cp .env.example .env |
| 39 | + echo "✅ Created root .env from .env.example" |
| 40 | + else |
| 41 | + echo "⚠️ Warning: root .env.example not found, creating minimal .env" |
| 42 | + touch .env |
| 43 | + fi |
52 | 44 |
|
53 | | - - name: Install Dependencies |
54 | | - run: | |
55 | | - # Install all dependencies (optional dependencies are installed by default) |
56 | | - # Use --frozen-lockfile to ensure reproducible builds |
57 | | - pnpm install --frozen-lockfile |
58 | | - |
59 | | - - name: Rebuild native modules |
60 | | - run: | |
61 | | - # Rebuild native modules to ensure compatibility with CI environment |
62 | | - pnpm rebuild || echo "Rebuild completed with warnings (some packages may not need rebuilding)" |
| 45 | + # Package-level .env files (e.g., blabsy) |
| 46 | + for dir in platforms/*/* infrastructure/*; do |
| 47 | + if [ -d "$dir" ] && [ -f "$dir/.env.example" ]; then |
| 48 | + cp "$dir/.env.example" "$dir/.env" |
| 49 | + echo "✅ Created $dir/.env from $dir/.env.example" |
| 50 | + fi |
| 51 | + done |
63 | 52 |
|
64 | | - - name: Build All Packages |
65 | | - run: | |
66 | | - # Build all packages using turbo |
67 | | - pnpm build |
| 53 | + - name: Install Dependencies |
| 54 | + run: | |
| 55 | + # Install all dependencies (optional dependencies are installed by default) |
| 56 | + # Use --frozen-lockfile to ensure reproducible builds |
| 57 | + pnpm install --frozen-lockfile |
68 | 58 |
|
| 59 | + - name: Rebuild native modules |
| 60 | + run: | |
| 61 | + # Rebuild native modules to ensure compatibility with CI environment |
| 62 | + pnpm rebuild || echo "Rebuild completed with warnings (some packages may not need rebuilding)" |
| 63 | +
|
| 64 | + - name: Build All Packages |
| 65 | + run: | |
| 66 | + # Build all packages using turbo |
| 67 | + pnpm build |
0 commit comments