diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c4e0dd39e4..4ebeaa5ed0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -166,3 +166,28 @@ jobs: - name: Run tests run: npx nx run-many --target=e2e + + build-npm-package: + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' + name: Attempt to build the NPM package + runs-on: ubuntu-latest + + steps: + - name: Checkout branch + uses: actions/checkout@v3 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build NPM package + working-directory: package + run: node generate-package.js