Skip to content

Commit 4e62304

Browse files
committed
Run qrcode package build in GitHub Actions using NodeJS 18 runtime
1 parent 3848ed2 commit 4e62304

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node: [ 18 ]
14+
fail-fast: false
15+
16+
steps:
17+
- name: checkout
18+
uses: actions/checkout@v4
19+
20+
- name: setup node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node }}
24+
25+
- name: install canvas dependencies
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
29+
30+
- name: npm ci
31+
run: npm ci
32+
33+
- name: npm run build
34+
run: npm run build
35+
36+
- name: npm test
37+
run: npm test
38+
39+
- name: npm pack
40+
run: npm pack
41+
42+
- name: upload artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: qrcode_nodejs_${{ matrix.node }}
46+
path: '*.tgz'
47+
compression-level: 0

0 commit comments

Comments
 (0)