Skip to content

Update node.js.yml

Update node.js.yml #9

Workflow file for this run

name: Node.js CI/CD for SquareCraft
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 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'
- run: npm ci
- run: npm run lint
- run: npm run build
- name: Upload Build Artifacts
if: success()
uses: actions/upload-artifact@v3
with:
name: build
path: dist/