feat: add native binary compilation to releases

- Add Bun-based native binary compilation for macOS, Linux, and Windows
- Create build_binaries.js script to compile from bundle/gemini.js
- Update release workflow to build and include binaries in GitHub releases
- Add build:binaries npm script

Related to #3804
This commit is contained in:
Daniel Young Lee
2025-08-10 12:44:05 -07:00
parent 2865a52778
commit 07316598bd
3 changed files with 88 additions and 0 deletions

View File

@@ -74,6 +74,11 @@ jobs:
node-version: '20'
cache: 'npm'
- name: Setup Bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
with:
bun-version: '1.2.20'
- name: Install Dependencies
run: npm ci
@@ -129,6 +134,9 @@ jobs:
npm run build:packages
npm run prepare:package
- name: Build Native Binaries
run: npm run build:binaries
- name: Configure npm for publishing
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
@@ -158,6 +166,7 @@ jobs:
run: |
gh release create ${{ steps.version.outputs.RELEASE_TAG }} \
bundle/gemini.js \
bundle/binaries/* \
--target "$RELEASE_BRANCH" \
--title "Release ${{ steps.version.outputs.RELEASE_TAG }}" \
--generate-notes