Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build-packages:
name: Build Packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
Comment on lines +21 to +23
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing workflows (pr-check.yml and release.yml) use actions/setup-node@v2 instead of actions/setup-node@v4. For consistency across the project, consider using the same version or updating all workflows to v4.

Additionally, the existing workflows use node-version: 20.12.2 (without quotes), while this uses '20.12.2' (with quotes). While both work, consistency would be preferable.

Suggested change
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
uses: actions/setup-node@v2
with:
node-version: 20.12.2

Copilot uses AI. Check for mistakes.

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
Comment on lines +35 to +36
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing workflows (pr-check.yml and release.yml) use actions/cache@v3, while this workflow uses actions/cache@v4. For consistency across the project, consider using the same version across all workflows.

Copilot uses AI. Check for mistakes.
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Configure Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Build all packages
run: pnpm turbo build --force

Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line contains trailing whitespace. Remove it for consistency with project formatting standards.

Suggested change

Copilot uses AI. Check for mistakes.
build-demos:
name: Build Demo Apps
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
demo:
- next-app
- vite-project
- react-router-app
- adonisjs
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.12.2'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Configure Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Build ${{ matrix.demo }}
run: pnpm turbo build --filter=@lingo.dev/demo-${{ matrix.demo }} --force
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter pattern @lingo.dev/demo-${{ matrix.demo }} doesn't match the actual package names in the demo directories. The actual package names are:

  • next-app (not @lingo.dev/demo-next-app)
  • vite-project (not @lingo.dev/demo-vite-project)
  • react-router-app (not @lingo.dev/demo-react-router-app)
  • adonis (not @lingo.dev/demo-adonisjs)

Change the filter to: --filter=${{ matrix.demo }}

Also note that the matrix value adonisjs doesn't match the package name adonis.

Copilot uses AI. Check for mistakes.

Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line contains trailing whitespace. Remove it for consistency with project formatting standards.

Suggested change

Copilot uses AI. Check for mistakes.
build-integrations:
name: Build Integrations
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
integration:
- directus
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.12.2'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.12.3
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Configure Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Build ${{ matrix.integration }}
run: pnpm turbo build --filter=@lingo.dev/integration-${{ matrix.integration }} --force
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter pattern @lingo.dev/integration-${{ matrix.integration }} doesn't match the actual package name. The directus integration package is named @replexica/integration-directus, not @lingo.dev/integration-directus.

Change the filter to: --filter=@replexica/integration-${{ matrix.integration }}

Suggested change
run: pnpm turbo build --filter=@lingo.dev/integration-${{ matrix.integration }} --force
run: pnpm turbo build --filter=@replexica/integration-${{ matrix.integration }} --force

Copilot uses AI. Check for mistakes.

build-summary:
name: Build Summary
runs-on: ubuntu-latest
needs: [build-packages, build-demos, build-integrations]
if: always()
steps:
- name: Check build results
run: |
if [ "${{ needs.build-packages.result }}" != "success" ]; then
echo "❌ Package builds failed"
exit 1
fi
if [ "${{ needs.build-demos.result }}" != "success" ]; then
echo "❌ Demo app builds failed"
exit 1
fi
if [ "${{ needs.build-integrations.result }}" != "success" ]; then
echo "❌ Integration builds failed"
exit 1
fi
echo "βœ… All builds passed successfully"