-
Notifications
You must be signed in to change notification settings - Fork 28
68 lines (60 loc) · 1.79 KB
/
bun-compile.yml
File metadata and controls
68 lines (60 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: bun-darwin-arm64
output: auggie-bun-darwin-arm64
- target: bun-darwin-x64
output: auggie-bun-darwin-x64
- target: bun-linux-x64
output: auggie-bun-linux-x64
- target: bun-windows-x64
output: auggie-bun-windows-x64.exe
permissions:
contents: read
steps:
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Create entry point
run: |
echo 'await import("npm:@augmentcode/auggie@${{ inputs.version }}");' > 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.output }}
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 }}" \
--title "v${{ inputs.version }}" \
--generate-notes \
artifacts/*