diff --git a/.github/workflows/build-packages-v1.yml b/.github/workflows/build-packages-v1.yml new file mode 100644 index 0000000..5869f3d --- /dev/null +++ b/.github/workflows/build-packages-v1.yml @@ -0,0 +1,60 @@ +name: Build and Test packages-v1 + +on: + push: + branches: + - main + paths: + - 'packages-v1/**' + - 'package.json' + - '.github/workflows/build-packages-v1.yml' + pull_request: + branches: + - main + paths: + - 'packages-v1/**' + - 'package.json' + - '.github/workflows/build-packages-v1.yml' + schedule: + - cron: '0 0 * * 0' # Run weekly on Sundays at midnight UTC + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [22, 24] + fail-fast: false + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Build packages-v1 + run: npm run build + + build-summary: + runs-on: ubuntu-latest + needs: build + if: always() + + steps: + - name: Check build status + run: | + if [ "${{ needs.build.result }}" != "success" ]; then + echo "Build failed for one or more Node.js versions" + exit 1 + fi + echo "All builds passed successfully"