-
Notifications
You must be signed in to change notification settings - Fork 28
Add bun-compile GitHub Action workflow #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
b2d7dca
5a63113
6659b2a
7d198cc
0753f6a
6419df6
8e56c07
7e74922
741590c
114d5ef
e588669
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Bun Compile | ||
| # Compiles Auggie CLI into self-contained native binaries using Bun, | ||
| # pulling the pre-built @augmentcode/auggie package from npm. | ||
|
|
||
| name: Bun Compile | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'npm package version (e.g. 0.17.0)' | ||
| required: true | ||
| type: string | ||
| repository_dispatch: | ||
| types: [npm-published] | ||
| push: | ||
| branches: | ||
| - auggie-bun-compile-workflow | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - target: bun-darwin-arm64 | ||
| output: auggie-darwin-arm64 | ||
| artifact: auggie-darwin-arm64 | ||
| - target: bun-darwin-x64 | ||
| output: auggie-darwin-x64 | ||
| artifact: auggie-darwin-x64 | ||
| - target: bun-linux-x64 | ||
| output: auggie-linux-x64 | ||
| artifact: auggie-linux-x64 | ||
| - target: bun-windows-x64 | ||
| output: auggie-windows-x64.exe | ||
| artifact: auggie-windows-x64 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Set up Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - name: Install package | ||
| run: bun install @augmentcode/auggie@${{ inputs.version || github.event.client_payload.version || '0.18.1' }} | ||
|
|
||
| - name: Create entry point | ||
| run: | | ||
| echo 'await import("@augmentcode/auggie");' > augment.mjs | ||
|
|
||
| - name: Compile binary | ||
| run: bun build augment.mjs --compile --target=${{ matrix.target }} --outfile=${{ matrix.output }} | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact }} | ||
| path: ${{ matrix.output }} | ||
|
|
||
| release: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts | ||
| merge-multiple: true | ||
|
|
||
| - name: Create GitHub Release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_REPO: ${{ github.repository }} | ||
| run: | | ||
| gh release create "v${{ inputs.version || github.event.client_payload.version || '0.18.1' }}" \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fallback is probably not good.. needs to crash if doesn't exist.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed — removed the |
||
| --title "v${{ inputs.version || github.event.client_payload.version || '0.18.1' }}" \ | ||
| --generate-notes \ | ||
| artifacts/* | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too.. crash if no value. do not fall back on 0.18.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed — removed the
'0.18.1'fallback here too. Version is passed viaenvand the step fails with a clear error if empty.