Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build workflow in GitHub Actions #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node: [ 18 ]
fail-fast: false

steps:
- name: checkout
uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: install canvas dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

- name: npm ci
run: npm ci

- name: npm run build
run: npm run build

- name: npm test
run: npm test

- name: npm pack
run: npm pack

- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: qrcode_nodejs_${{ matrix.node }}
path: '*.tgz'
compression-level: 0