Skip to content

Commit a7f3d0b

Browse files
committed
fix: use official tree-sitter prebuild workflow for multi-platform support
This uses the official tree-sitter/workflows prebuild workflow which properly builds binaries for all 6 platform combinations: - Windows x64 & ARM64 - Linux x64 & ARM64 - macOS Intel & Apple Silicon
1 parent 9f8f0eb commit a7f3d0b

File tree

1 file changed

+13
-51
lines changed

1 file changed

+13
-51
lines changed

.github/workflows/prebuild.yml

Lines changed: 13 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,18 @@ on:
99
pull_request:
1010
workflow_dispatch:
1111

12+
concurrency:
13+
group: ${{github.workflow}}-${{github.ref}}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
prebuild:
14-
strategy:
15-
matrix:
16-
os:
17-
- windows-2025
18-
- windows-11-arm
19-
- ubuntu-24.04
20-
- ubuntu-24.04-arm
21-
- macos-15
22-
- macos-15-intel
23-
runs-on: ${{ matrix.os }}
24-
steps:
25-
- uses: actions/checkout@v5
26-
27-
- uses: actions/setup-node@v6
28-
with:
29-
node-version: 22
30-
cache: npm
31-
32-
- name: Install dependencies
33-
run: npm install --omit peer --omit optional
34-
35-
- name: Build binary
36-
run: npm x -- prebuildify -t 20.19.5
37-
38-
- name: Upload prebuilds
39-
uses: actions/upload-artifact@v5
40-
with:
41-
name: prebuilds-${{ matrix.os }}
42-
path: prebuilds/**
43-
44-
combine:
45-
needs: prebuild
46-
runs-on: ubuntu-latest
47-
steps:
48-
- uses: actions/checkout@v5
49-
50-
- name: Download all prebuilds
51-
uses: actions/download-artifact@v5
52-
with:
53-
path: all-prebuilds
54-
55-
- name: Combine prebuilds
56-
run: |
57-
mkdir -p prebuilds
58-
find all-prebuilds -type f -name '*.node' -exec cp {} prebuilds/ \;
59-
60-
- name: Upload combined prebuilds
61-
uses: actions/upload-artifact@v5
62-
with:
63-
name: prebuilds-combined
64-
path: prebuilds/
18+
uses: tree-sitter/workflows/.github/workflows/package-prebuild.yml@main
19+
with:
20+
platforms: >-
21+
windows-2025,
22+
windows-11-arm,
23+
ubuntu-24.04,
24+
ubuntu-24.04-arm,
25+
macos-15,
26+
macos-15-intel

0 commit comments

Comments
 (0)