Skip to content

Commit c0cff11

Browse files
committed
[ci] Build and deploy two platform-specific binaries for macOS
1 parent 33932c1 commit c0cff11

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ jobs:
1313
matrix:
1414
arch:
1515
- x64
16+
- arm64
1617
node:
1718
- 20
1819
- 22
1920
- 24
2021
os:
2122
- macos-latest
23+
- macos-15-intel
2224
- ubuntu-latest
2325
- windows-latest
26+
exclude:
27+
- arch: arm64
28+
os: macos-15-intel
29+
- arch: arm64
30+
os: ubuntu-latest
31+
- arch: arm64
32+
os: windows-latest
2433
include:
2534
- arch: x86
2635
node: 20
@@ -44,16 +53,15 @@ jobs:
4453
matrix:
4554
arch:
4655
- x64
47-
- x86
4856
os:
4957
- macos-15-intel
5058
- ubuntu-22.04
5159
- windows-latest
52-
exclude:
53-
- arch: x86
54-
os: macos-15-intel
60+
include:
5561
- arch: x86
56-
os: ubuntu-22.04
62+
os: windows-latest
63+
- arch: arm64
64+
os: macos-latest
5765
steps:
5866
- uses: actions/checkout@v6
5967
- uses: actions/setup-node@v6
@@ -62,9 +70,6 @@ jobs:
6270
architecture: ${{ matrix.arch }}
6371
- run: npm install
6472
- run: npm run prebuild
65-
if: matrix.os != 'macos-15-intel'
66-
- run: npm run prebuild-darwin-x64+arm64
67-
if: matrix.os == 'macos-15-intel'
6873
- uses: actions/upload-artifact@v5
6974
with:
7075
name: ${{ matrix.os }}-${{ matrix.arch }}
@@ -83,9 +88,11 @@ jobs:
8388
- run: echo "version=$(git describe --tags)" >> $GITHUB_OUTPUT
8489
id: get_version
8590
- run:
86-
tar -cvf "${{ steps.get_version.outputs.version
87-
}}-darwin-x64+arm64.tar" -C "prebuilds/macos-15-intel-x64"
88-
darwin-x64+arm64
91+
tar -cvf "${{ steps.get_version.outputs.version }}-darwin-x64.tar" -C
92+
"prebuilds/macos-15-intel-x64" darwin-x64
93+
- run:
94+
tar -cvf "${{ steps.get_version.outputs.version }}-darwin-arm64.tar" -C
95+
"prebuilds/macos-latest-arm64" darwin-arm64
8996
- run:
9097
tar -cvf "${{ steps.get_version.outputs.version }}-linux-x64.tar" -C
9198
"prebuilds/ubuntu-22.04-x64" linux-x64

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"scripts": {
1010
"install": "node-gyp-build",
1111
"prebuild": "prebuildify --napi --strip --target=8.11.2",
12-
"prebuild-darwin-x64+arm64": "prebuildify --arch x64+arm64 --napi --strip --target=8.11.2",
1312
"test": "mocha"
1413
},
1514
"repository": {

0 commit comments

Comments
 (0)