name: Build Addon

on:
  pull_request:
    branches:
      - main
    paths:
      - 'packages/**'
      - 'package-lock.json'
      - 'package.json'
      - 'tsconfig.json'
      - 'tsconfig.base.json'

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '22.x'

      - name: Install corepack
        run: corepack enable
      - name: Install Dependencies
        run: pnpm install --frozen-lockfile
      - name: Build Addon
        run: pnpm run build
