Skip to content

Commit 018e5e2

Browse files
ci: add cross-platform tui release bundles
1 parent fbef655 commit 018e5e2

5 files changed

Lines changed: 125 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ jobs:
5959
- name: Build
6060
run: bun run build
6161

62+
- name: TUI compile smoke test
63+
run: |
64+
mkdir -p apps/tui/dist
65+
bun build apps/tui/src/index.tsx --compile --outfile apps/tui/dist/cable-intel-tui
66+
./apps/tui/dist/cable-intel-tui --help
67+
6268
- name: Publish summary
6369
if: always()
6470
run: |
@@ -68,3 +74,4 @@ jobs:
6874
echo "- shopify ingest integration test" >> "$GITHUB_STEP_SUMMARY"
6975
echo "- shopify source integration test" >> "$GITHUB_STEP_SUMMARY"
7076
echo "- workspace build" >> "$GITHUB_STEP_SUMMARY"
77+
echo "- TUI compile smoke test" >> "$GITHUB_STEP_SUMMARY"

.github/workflows/tui-release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: tui-release
2+
3+
on:
4+
push:
5+
tags:
6+
- "tui-v*"
7+
- "v*"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build-binaries:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: ubuntu-latest
20+
asset_name: cable-intel-tui-linux-x64
21+
exec_name: cable-intel-tui-linux-x64
22+
shell: bash
23+
- os: macos-13
24+
asset_name: cable-intel-tui-macos-x64
25+
exec_name: cable-intel-tui-macos-x64
26+
shell: bash
27+
- os: macos-14
28+
asset_name: cable-intel-tui-macos-arm64
29+
exec_name: cable-intel-tui-macos-arm64
30+
shell: bash
31+
- os: windows-latest
32+
asset_name: cable-intel-tui-windows-x64.exe
33+
exec_name: cable-intel-tui-windows-x64.exe
34+
shell: pwsh
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
- name: Setup Bun
41+
uses: oven-sh/setup-bun@v2
42+
with:
43+
bun-version: 1.3.8
44+
45+
- name: Install dependencies
46+
run: bun install --frozen-lockfile
47+
shell: ${{ matrix.shell }}
48+
49+
- name: Build + smoke test (unix)
50+
if: matrix.shell == 'bash'
51+
shell: bash
52+
run: |
53+
set -euo pipefail
54+
mkdir -p apps/tui/dist
55+
bun build apps/tui/src/index.tsx --compile --outfile "apps/tui/dist/${{ matrix.exec_name }}"
56+
"./apps/tui/dist/${{ matrix.exec_name }}" --help
57+
shasum -a 256 "apps/tui/dist/${{ matrix.exec_name }}" > "apps/tui/dist/${{ matrix.exec_name }}.sha256"
58+
59+
- name: Build + smoke test (windows)
60+
if: matrix.shell == 'pwsh'
61+
shell: pwsh
62+
run: |
63+
New-Item -ItemType Directory -Force -Path apps/tui/dist | Out-Null
64+
bun build apps/tui/src/index.tsx --compile --outfile "apps/tui/dist/${{ matrix.exec_name }}"
65+
& "apps/tui/dist/${{ matrix.exec_name }}" --help
66+
$hash = (Get-FileHash -Path "apps/tui/dist/${{ matrix.exec_name }}" -Algorithm SHA256).Hash.ToLower()
67+
"$hash *${{ matrix.exec_name }}" | Set-Content "apps/tui/dist/${{ matrix.exec_name }}.sha256"
68+
69+
- name: Upload binary artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: ${{ matrix.asset_name }}
73+
path: |
74+
apps/tui/dist/${{ matrix.exec_name }}
75+
apps/tui/dist/${{ matrix.exec_name }}.sha256
76+
if-no-files-found: error
77+
78+
publish-release:
79+
if: startsWith(github.ref, 'refs/tags/')
80+
needs: build-binaries
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Download artifacts
84+
uses: actions/download-artifact@v4
85+
with:
86+
path: release-assets
87+
merge-multiple: true
88+
89+
- name: Publish release assets
90+
uses: softprops/action-gh-release@v2
91+
with:
92+
tag_name: ${{ github.ref_name }}
93+
generate_release_notes: true
94+
files: release-assets/*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Web app: `http://localhost:5173`
3636
- `bun run fix`: apply Ultracite fixes
3737
- `bun run seed:vercel-deployment -- --vercel-url <deployment-url>`: derive Convex preview/prod deployment from a Vercel URL, seed Anker ingest data, and print a quality summary
3838
- `bun run --cwd apps/tui start`: interactive ingest manager TUI (discover/seed/report)
39+
- `bun run --cwd apps/tui build:bin`: compile standalone TUI binary (`apps/tui/dist/cable-intel-tui`)
3940

4041
## Ingest Notes
4142

apps/tui/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Terminal manager for ingest operations (discover URLs, run seed ingest, and
44
view quality summary) without needing an admin web page.
55

6+
Works in standard terminals, including Ghostty, WezTerm, iTerm2, and Terminal.
7+
68
## Setup
79

810
```bash
@@ -29,3 +31,22 @@ Non-interactive examples:
2931
bun run --cwd apps/tui start --vercel-url https://www.cableintel.com --seed-max 20 --yes
3032
bun run --cwd apps/tui start --deployment-name enduring-partridge-214 --report-only --yes
3133
```
34+
35+
## Build Binary Locally
36+
37+
```bash
38+
bun run --cwd apps/tui build:bin
39+
./apps/tui/dist/cable-intel-tui --help
40+
```
41+
42+
## GitHub Release Bundles
43+
44+
Tag pushes matching `tui-v*` or `v*` trigger `.github/workflows/tui-release.yml`.
45+
That workflow builds standalone binaries for:
46+
47+
- Linux x64
48+
- macOS x64
49+
- macOS arm64
50+
- Windows x64
51+
52+
Assets are attached automatically to the GitHub Release.

apps/tui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"module": "src/index.tsx",
66
"scripts": {
77
"start": "bun src/index.tsx",
8-
"dev": "bun --watch src/index.tsx"
8+
"dev": "bun --watch src/index.tsx",
9+
"build:bin": "bun build src/index.tsx --compile --outfile dist/cable-intel-tui"
910
},
1011
"dependencies": {
1112
"@babel/core": "^7.29.0",

0 commit comments

Comments
 (0)