Skip to content

Commit b59af69

Browse files
author
谢英杰
committed
feat: add GitHub workflow for multi-arch builds (x64 and arm64)
1 parent 2348346 commit b59af69

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
strategy:
17+
matrix:
18+
target: [x64, arm64]
19+
runs-on: macos-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: lts/-1
26+
- name: Install Dependencies
27+
run: npm ci
28+
- name: Build for ${{ matrix.target }}
29+
run: |
30+
export npm_config_arch=${{ matrix.target }}
31+
npm run build
32+
- name: Upload Artifacts
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: node-mac-permissions-${{ matrix.target }}
36+
path: build/Release/permissions.node

0 commit comments

Comments
 (0)