Skip to content

Commit 87f81d4

Browse files
fix: publish npm package with prebuilt binaries (#237)
Use the reusable workflow from tree-sitter/workflows to build native binaries for all major platforms (linux-x64, linux-arm64, macos-x64, macos-arm64, windows-x64, windows-arm64) and WASM before publishing to npm. This means users no longer need a C compiler or node-gyp to install tree-sitter-kotlin — prebuilt binaries are bundled in the npm package, matching how official tree-sitter parsers ship. Fixes #143 Fixes #167
1 parent 410c940 commit 87f81d4

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

.github/workflows/deploy-to-npm.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,9 @@ on:
55
- '*'
66

77
jobs:
8-
deploy:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v3
12-
- name: Set up Node
13-
uses: actions/setup-node@v3
14-
with:
15-
node-version: '18'
16-
registry-url: 'https://registry.npmjs.org'
17-
- name: Install dependencies
18-
run: npm install
19-
- name: Compile grammar
20-
run: npm run generate
21-
- name: Publish to npm
22-
run: npm publish
23-
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8+
npm:
9+
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
10+
secrets:
11+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
12+
with:
13+
generate: true

0 commit comments

Comments
 (0)