Skip to content

Commit 2877ced

Browse files
committed
feat(ci): separate CLI and GUI release workflows
- CLI release (v*): Go tests only, exclude v*-gui tags - GUI release (v*-gui): Full tests (Go + Frontend) before building CLI release workflow: - Triggers on v* tags except v*-gui - Runs Go tests - GoReleaser builds GUI release workflow: - Triggers on v*-gui tags - Job: test-backend (Go build + test) - Job: test-frontend (TypeScript + React tests) - Job: build-macos (needs tests to pass first)
1 parent 284a122 commit 2877ced

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/release-gui.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,56 @@ permissions:
1515
contents: write
1616

1717
jobs:
18+
# Backend tests (Go) - must pass before building
19+
test-backend:
20+
name: Backend Tests
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version: '1.21'
29+
30+
- name: Create dummy frontend directory
31+
run: mkdir -p frontend/dist && echo "Test build" > frontend/dist/README.txt
32+
33+
- name: Build
34+
run: go build -v ./cmd/... ./internal/... ./pkg/...
35+
36+
- name: Test
37+
run: go test -v ./cmd/... ./internal/... ./pkg/...
38+
39+
# Frontend tests (React + TypeScript) - must pass before building
40+
test-frontend:
41+
name: Frontend Tests
42+
runs-on: ubuntu-latest
43+
defaults:
44+
run:
45+
working-directory: ./frontend
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: '18'
53+
54+
- name: Install dependencies
55+
run: npm install
56+
57+
- name: Run TypeScript check
58+
run: npx tsc --noEmit
59+
60+
- name: Run tests
61+
run: npm run test:run
62+
63+
# Build macOS App - only after all tests pass
1864
build-macos:
1965
name: Build macOS App
2066
runs-on: macos-latest
67+
needs: [test-backend, test-frontend] # Wait for tests to pass
2168
steps:
2269
- name: Checkout
2370
uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
- '!v*-gui' # Exclude GUI tags - they use release-gui.yml
78

89
permissions:
910
contents: write

0 commit comments

Comments
 (0)