Add CodeRabbit configuration and ignore .claude/settings.local.json #176
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: Build | |
| on: | |
| workflow_call: | |
| push: | |
| branches: | |
| - trunk | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| BuildExtensionBundle: | |
| name: Build extension bundle | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_COLOR: 2 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare PHP | |
| uses: woocommerce/grow/prepare-php@actions-v2 | |
| with: | |
| install-deps: "no" | |
| - name: Prepare node | |
| uses: woocommerce/grow/prepare-node@actions-v2 | |
| with: | |
| node-version-file: ".nvmrc" | |
| install-deps: "no" | |
| - name: Upgrade npm | |
| run: npm install -g npm@11 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build production bundle | |
| run: | | |
| echo "::group::Build log" | |
| npm run build | |
| echo "::endgroup::" | |
| - name: Publish dev build to GitHub | |
| if: ${{ github.event_name == 'push' && github.ref_name == 'trunk' }} | |
| uses: woocommerce/grow/publish-extension-dev-build@actions-v2 | |
| with: | |
| extension-asset-path: woocommerce-google-analytics-integration.zip | |
| - name: Publish build artifact | |
| if: ${{ ! ( github.event_name == 'push' && github.ref_name == 'trunk' ) }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: woocommerce-google-analytics-integration.zip | |
| path: ${{ github.workspace }}/woocommerce-google-analytics-integration.zip | |
| # Do not bloat the storage. Keep in only long enough for a caller workflow to pick it up and follow up with some manual debugging. | |
| retention-days: 2 |