Skip to content

Fix build failure: upgrade Node 8.x → 20.x for macOS arm64 compatibility and add PR trigger #29

Fix build failure: upgrade Node 8.x → 20.x for macOS arm64 compatibility and add PR trigger

Fix build failure: upgrade Node 8.x → 20.x for macOS arm64 compatibility and add PR trigger #29

Workflow file for this run

name: build
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
# Updated from [8.x, 10.x, 12.x] to [20.x] to fix build failure on macOS arm64 runners.
# Node 8.x is not available on macOS arm64 architecture.
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
env:
CI: true