Repository navigation
Releasing version 2.142.2 #111
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: NPM Build on PR Open | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [16, 20] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Log GitHub event | |
| env: | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| run: | | |
| printf 'PR head sha: %s\n' "$PR_HEAD_SHA" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Log Node.js and npm versions | |
| run: | | |
| echo "Node.js version: $(node --version)" | |
| echo "npm version: $(npm --version)" | |
| - name: Install dependencies | |
| run: | | |
| echo "Installing dependencies..." | |
| npm install | |
| echo "Dependencies installed." | |
| - name: Run build | |
| run: | | |
| echo "Running build..." | |
| npm run build | |
| echo "Build completed." |