Skip to content

Commit 96172ea

Browse files
committed
ci: build-engine workflow for cross-platform bundles
1 parent 6bf5bbd commit 96172ea

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/build-engine.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build engine bundles
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
description: "Engine release tag (e.g. engine-v0.1.0)"
8+
required: true
9+
10+
jobs:
11+
build:
12+
name: Build all platform bundles
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "22"
20+
- name: Install engine deps
21+
working-directory: engine
22+
run: npm ci
23+
- name: Build all bundles
24+
working-directory: engine
25+
run: |
26+
for tgt in darwin-arm64 darwin-x64 linux-x64 linux-arm64 win32-x64 win32-arm64; do
27+
echo "::group::Build $tgt"
28+
bash scripts/build-bundle.sh "$tgt"
29+
echo "::endgroup::"
30+
done
31+
- name: Generate SHA256SUMS
32+
working-directory: engine/release
33+
run: |
34+
sha256sum codegraph-*.{tar.gz,zip} 2>/dev/null > SHA256SUMS || \
35+
shasum -a 256 codegraph-*.{tar.gz,zip} > SHA256SUMS
36+
cat SHA256SUMS
37+
- name: Upload artifacts
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: engine-bundles
41+
path: |
42+
engine/release/codegraph-*.tar.gz
43+
engine/release/codegraph-*.zip
44+
engine/release/SHA256SUMS
45+
retention-days: 30
46+
- name: Create draft GitHub Release
47+
env:
48+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |
50+
gh release create "${{ inputs.release_tag }}" \
51+
--title "Engine ${{ inputs.release_tag }}" \
52+
--notes "Auto-built engine bundles from $(git rev-parse --short HEAD)." \
53+
--draft \
54+
engine/release/codegraph-*.tar.gz \
55+
engine/release/codegraph-*.zip \
56+
engine/release/SHA256SUMS

0 commit comments

Comments
 (0)