# ~~ Generated by projen. To modify, edit .projenrc.ts and run "yarn projen". name: build on: pull_request: {} workflow_dispatch: {} merge_group: {} jobs: build: runs-on: ubuntu-latest permissions: contents: write outputs: self_mutation_happened: ${{ steps.self_mutation.outputs.self_mutation_happened }} env: CI: "true" steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Enable corepack run: corepack enable - name: Setup Node.js uses: actions/setup-node@v7.1.0 with: node-version: lts/* package-manager-cache: false - name: Install dependencies run: yarn install --no-immutable - name: build run: yarn projen build - name: Find mutations id: self_mutation run: |- git add . git diff --staged --patch --exit-code > repo.patch || echo "self_mutation_happened=true" >> $GITHUB_OUTPUT shell: bash working-directory: ./ - name: Upload patch if: steps.self_mutation.outputs.self_mutation_happened uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 with: name: repo.patch path: repo.patch overwrite: true - name: Fail build on mutation if: steps.self_mutation.outputs.self_mutation_happened run: |- echo "::error::Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch." cat repo.patch exit 1