Skip to content

Commit b763917

Browse files
committed
ci: build fixes
1 parent f071518 commit b763917

5 files changed

Lines changed: 20 additions & 34 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -60,49 +60,21 @@ jobs:
6060
# Linux x64
6161
- os: ubuntu-latest
6262
arch: x64
63-
node: 20
64-
- os: ubuntu-latest
65-
arch: x64
66-
node: 22
67-
- os: ubuntu-latest
68-
arch: x64
69-
node: 24
7063

7164
# Linux arm64
7265
- os: ubuntu-24.04-arm
7366
arch: arm64
74-
node: 20
75-
- os: ubuntu-24.04-arm
76-
arch: arm64
77-
node: 22
78-
- os: ubuntu-24.04-arm
79-
arch: arm64
80-
node: 24
8167

8268
# macOS arm64 (Apple Silicon)
8369
- os: macos-latest
8470
arch: arm64
85-
node: 20
86-
- os: macos-latest
87-
arch: arm64
88-
node: 22
89-
- os: macos-latest
90-
arch: arm64
91-
node: 24
9271

9372
# Windows x64
9473
- os: windows-latest
9574
arch: x64
96-
node: 20
97-
- os: windows-latest
98-
arch: x64
99-
node: 22
100-
- os: windows-latest
101-
arch: x64
102-
node: 24
10375

10476
runs-on: ${{ matrix.os }}
105-
name: Prebuild ${{ matrix.os }} / ${{ matrix.arch }} / Node ${{ matrix.node }}
77+
name: Prebuild ${{ matrix.os }} / ${{ matrix.arch }}
10678

10779
steps:
10880
- uses: actions/checkout@v4
@@ -112,7 +84,7 @@ jobs:
11284
- name: Setup Node.js
11385
uses: actions/setup-node@v4
11486
with:
115-
node-version: ${{ matrix.node }}
87+
node-version: 22
11688

11789
- name: Setup pnpm
11890
uses: pnpm/action-setup@v4
@@ -123,12 +95,12 @@ jobs:
12395
run: pnpm install --ignore-scripts
12496

12597
- name: Build prebuild
126-
run: pnpm prebuild --target ${{ matrix.node }}.0.0 --arch ${{ matrix.arch }}
98+
run: pnpm prebuild --arch ${{ matrix.arch }}
12799

128100
- name: Upload prebuild artifact
129101
uses: actions/upload-artifact@v4
130102
with:
131-
name: prebuild-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}
103+
name: prebuild-${{ matrix.os }}-${{ matrix.arch }}
132104
path: prebuilds/
133105
retention-days: 1
134106

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
build/
33
dist/
44
node_modules/
5+
prebuilds/
56

67
# IDE support
78
.idea/
89
.*.sw?
9-
compile_commands.json
10+
compile_commands.json

binding.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"deps/lite3/lib/nibble_base64/base64.c"
1717
],
1818
"include_dirs": [
19+
"<!@(node -p \"require('node-addon-api').include\")",
1920
"include",
2021
"deps/lite3/include",
2122
"deps/lite3/lib"

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"build:ts": "tsup",
3232
"build": "pnpm build:native && pnpm build:ts",
3333
"install": "prebuild-install || node-gyp rebuild",
34-
"prebuild": "prebuild --all --strip",
34+
"prebuild": "prebuild --strip --runtime napi --target 9",
3535
"clean": "node-gyp clean && rm -rf dist prebuilds",
3636
"test": "node --test",
3737
"release:dry-run": "semantic-release --dry-run"
@@ -46,6 +46,9 @@
4646
],
4747
"license": "MIT",
4848
"gypfile": true,
49+
"binary": {
50+
"napi_versions": [9]
51+
},
4952
"devDependencies": {
5053
"@semantic-release/commit-analyzer": "^13.0.1",
5154
"@semantic-release/github": "^12.0.2",
@@ -64,6 +67,7 @@
6467
},
6568
"dependencies": {
6669
"bindings": "^1.5.0",
70+
"node-addon-api": "^8.5.0",
6771
"prebuild-install": "^7.1.3"
6872
}
6973
}

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)