Skip to content

Add offscreen canvas demo #49

Add offscreen canvas demo

Add offscreen canvas demo #49

name: Build, lint, test
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Volta and Node.js
uses: volta-cli/action@v3
- run: npm ci
- run: npm run build
- run: npm run lint
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
retention-days: 5
test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Download dist directory
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: npm ci
- run: npm test
pack:
needs: build
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- name: Setup Volta and Node.js
uses: volta-cli/action@v3
- name: Download dist directory
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: mkdir out && cd dist/fancy-canvas && npm pack --pack-destination ../../out
- uses: actions/upload-artifact@v3
with:
name: Package tarball
path: out/fancy-canvas-${{ github.ref_name }}.tgz
retention-days: 30