Skip to content

Commit 7459444

Browse files
committed
fix(build): add build step to workflows and define build script in package.json
1 parent d45c83c commit 7459444

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
node-version: 20
3232
cache: "npm"
3333
- run: npm ci --ignore-scripts
34+
- run: npm run build:dist
3435
- run: npm run lint
3536

3637
prebuild-mac-win:
@@ -113,6 +114,7 @@ jobs:
113114
node-version: ${{ matrix.node-version }}
114115
cache: "npm"
115116
- run: npm ci
117+
- run: npm run build:dist
116118
- run: npm test
117119

118120
test-ubuntu:
@@ -137,6 +139,7 @@ jobs:
137139
path: ./prebuilds
138140
merge-multiple: true
139141
- run: npm ci
142+
- run: npm run build:dist
140143
- run: npm test
141144

142145
test-alpine:
@@ -161,6 +164,7 @@ jobs:
161164
apk add build-base git python3 py3-setuptools --update-cache && \
162165
cd /tmp/project && \
163166
npm ci && \
167+
npm run build:dist && \
164168
npm test"
165169
166170
# Node.js compatibility tests require --experimental-sqlite flag and Node 22+
@@ -178,6 +182,7 @@ jobs:
178182
node-version: ${{ matrix.node-version }}
179183
cache: "npm"
180184
- run: npm ci
185+
- run: npm run build:dist
181186
- name: Check API compatibility types (TypeScript compile-time validation)
182187
run: npm run lint:api-compat
183188
- name: Run API type compatibility tests (ensures our TypeScript types match node:sqlite)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"sync:node": "tsx scripts/sync-from-node.ts",
3434
"sync:sqlite": "tsx scripts/sync-from-sqlite.ts",
3535
"node-gyp-rebuild": "node-gyp rebuild",
36+
"build": "run-p build:native build:dist",
3637
"build:native": "prebuildify --napi --tag-libc --strip",
3738
"build:linux-glibc": "bash scripts/prebuild-linux-glibc.sh",
3839
"build:dist": "tsup && node scripts/post-build.mjs",

0 commit comments

Comments
 (0)