Dev => Staging #1182
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🧪 Test SDK build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| - staging | |
| # paths filter removed; gating handled via jobs.changes with dorny/paths-filter | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - staging | |
| paths: | |
| - "cloud/packages/sdk/**" | |
| - "cloud/bun.lock" | |
| - "cloud/package.json" | |
| concurrency: | |
| group: sdk-build-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| sdk: | |
| name: Build cloud/packages/sdk | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Compute changes | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| sdk: | |
| - 'cloud/packages/sdk/**' | |
| - 'cloud/bun.lock' | |
| - 'cloud/package.json' | |
| - name: Skip if no SDK changes | |
| if: steps.filter.outputs.sdk != 'true' | |
| run: echo "No changes under cloud/packages/sdk; skipping build." | |
| - name: Setup Bun | |
| if: steps.filter.outputs.sdk == 'true' | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache Bun cache | |
| if: steps.filter.outputs.sdk == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-cache-sdk-${{ hashFiles('cloud/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-cache-sdk- | |
| - name: Install dependencies | |
| if: steps.filter.outputs.sdk == 'true' | |
| working-directory: cloud | |
| run: bun install | |
| - name: Build SDK package | |
| if: steps.filter.outputs.sdk == 'true' | |
| working-directory: cloud/packages/sdk | |
| run: bun run build | |
| - name: Build types package | |
| if: steps.filter.outputs.sdk == 'true' | |
| working-directory: cloud/packages/types | |
| run: bun run build |