Skip to content

Commit c290d18

Browse files
guyernestclaude
andcommitted
feat(ci): Add GitHub Actions for multi-platform builds
Add comprehensive CI/CD for both local agents with native builds on all platforms. ## GitHub Actions Workflows ### Browser Agent (.github/workflows/release-browser-agent.yml) - Builds on macOS (Intel + ARM64), Windows x64, Linux x64 - Creates DMG, MSI, and DEB installers - Bundles Python dependencies (Nova Act, Playwright, boto3) - Triggered by tags: browser-agent-v* ### Local Agent (.github/workflows/release-local-agent.yml) - Builds on macOS (Intel + ARM64), Windows x64, Linux x64 - Creates DMG, MSI, and DEB installers - Bundles Python dependencies (PyAutoGUI, OpenCV, Pillow) - Triggered by tags: local-agent-v* ## Windows Setup Scripts ### Browser Agent - SETUP.ps1: PowerShell script for Python environment setup - SETUP.bat: Batch wrapper for PowerShell script - Installs uv, creates venv, installs dependencies, downloads Chromium ### Local Agent - SETUP.ps1: PowerShell script for Python environment setup - SETUP.bat: Batch wrapper for PowerShell script - Installs uv, creates venv, installs PyAutoGUI/OpenCV dependencies ## Config Path Improvements (Browser Agent) - Move config from ~/config.yaml to ~/.local-browser-agent/config.yaml - Cross-platform consistent path (works on macOS, Windows, Linux) - Auto-creates config directory - Updated all references in: - config.rs: Added default_config_dir() and default_config_path() - config_commands.rs: Updated resolve_config_path() - main.rs: Use new default path - test_commands.rs: Config reloading with new path - ConfigScreen.tsx: Updated UI messages ## Documentation - .github/RELEASE_PROCESS.md: Complete guide for creating releases - Tag naming conventions - Manual trigger instructions - Installation instructions per platform - Troubleshooting guide - Future improvements ## Benefits ✅ Native builds on each platform (no cross-compilation) ✅ Automated releases via git tags ✅ No need for local Windows/Linux machines ✅ Consistent build environment ✅ Free on GitHub Actions ✅ Draft releases for review before publishing ## Usage Create a release: git tag browser-agent-v0.1.0 && git push origin browser-agent-v0.1.0 git tag local-agent-v0.2.0 && git push origin local-agent-v0.2.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 2cab8bb commit c290d18

File tree

12 files changed

+768
-21
lines changed

12 files changed

+768
-21
lines changed

.github/RELEASE_PROCESS.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Multi-Platform Release Process
2+
3+
This document explains how to create releases for both local agents using GitHub Actions.
4+
5+
## Overview
6+
7+
We have two separate agents with independent release cycles:
8+
9+
1. **Local Browser Agent** - Browser automation with Nova Act
10+
2. **Local Agent** - GUI automation with PyAutoGUI
11+
12+
Each agent builds for **macOS (Intel + Apple Silicon), Windows, and Linux** automatically via GitHub Actions.
13+
14+
## Release Process
15+
16+
### 1. Browser Agent Release
17+
18+
```bash
19+
# Ensure you're on main and up to date
20+
git checkout main
21+
git pull origin main
22+
23+
# Create and push a tag
24+
git tag browser-agent-v0.1.0
25+
git push origin browser-agent-v0.1.0
26+
```
27+
28+
This triggers `.github/workflows/release-browser-agent.yml` which:
29+
- ✅ Builds on macOS (Intel + ARM64), Windows (x64), Linux (x64)
30+
- ✅ Creates DMG, MSI, and DEB installers
31+
- ✅ Bundles Python dependencies (Nova Act, Playwright, boto3)
32+
- ✅ Creates a **draft** GitHub release with all artifacts
33+
34+
### 2. Local Agent Release
35+
36+
```bash
37+
# Create and push a tag
38+
git tag local-agent-v0.2.0
39+
git push origin local-agent-v0.2.0
40+
```
41+
42+
This triggers `.github/workflows/release-local-agent.yml` which:
43+
- ✅ Builds on macOS (Intel + ARM64), Windows (x64), Linux (x64)
44+
- ✅ Creates DMG, MSI, and DEB installers
45+
- ✅ Bundles Python dependencies (PyAutoGUI, OpenCV, Pillow)
46+
- ✅ Creates a **draft** GitHub release with all artifacts
47+
48+
### 3. Review and Publish
49+
50+
1. Go to [GitHub Releases](https://github.com/YOUR_ORG/step-functions-agent/releases)
51+
2. Find your **draft** release
52+
3. Review the artifacts:
53+
- macOS DMG files (Intel and ARM64)
54+
- Windows MSI installer
55+
- Linux DEB package
56+
4. Edit release notes if needed
57+
5. Click **Publish release**
58+
59+
## Tag Naming Convention
60+
61+
- **Browser Agent**: `browser-agent-v{MAJOR}.{MINOR}.{PATCH}`
62+
- Example: `browser-agent-v0.1.0`
63+
- **Local Agent**: `local-agent-v{MAJOR}.{MINOR}.{PATCH}`
64+
- Example: `local-agent-v0.2.0`
65+
66+
## Manual Triggering
67+
68+
You can also trigger builds manually without tags:
69+
70+
1. Go to Actions → Select workflow
71+
2. Click "Run workflow"
72+
3. Select branch
73+
4. Click "Run workflow" button
74+
75+
## What Gets Built
76+
77+
### Browser Agent Installers
78+
79+
| Platform | Architecture | File | Size (approx) |
80+
|----------|--------------|------|---------------|
81+
| macOS | ARM64 (M1/M2/M3) | `Local.Browser.Agent_0.1.0_aarch64.dmg` | ~4MB |
82+
| macOS | Intel (x64) | `Local.Browser.Agent_0.1.0_x64.dmg` | ~4MB |
83+
| Windows | x64 | `Local.Browser.Agent_0.1.0_x64_en-US.msi` | ~3MB |
84+
| Linux | x64 | `local-browser-agent_0.1.0_amd64.deb` | ~3MB |
85+
86+
### Local Agent Installers
87+
88+
| Platform | Architecture | File | Size (approx) |
89+
|----------|--------------|------|---------------|
90+
| macOS | ARM64 (M1/M2/M3) | `Local.Agent_0.2.0_aarch64.dmg` | ~3MB |
91+
| macOS | Intel (x64) | `Local.Agent_0.2.0_x64.dmg` | ~3MB |
92+
| Windows | x64 | `Local.Agent_0.2.0_x64_en-US.msi` | ~2.5MB |
93+
| Linux | x64 | `local-agent_0.2.0_amd64.deb` | ~2.5MB |
94+
95+
**Note**: Installers are small because Python dependencies are downloaded on first run via `SETUP.sh` (macOS/Linux) or `SETUP.ps1` (Windows).
96+
97+
## Installation Instructions
98+
99+
### macOS
100+
101+
```bash
102+
# Download and open DMG
103+
open Local.Browser.Agent_*.dmg
104+
105+
# Drag app to Applications folder
106+
# First run: System Preferences → Security → Allow
107+
108+
# Run setup
109+
open "/Applications/Local Browser Agent.app"
110+
# Click "Setup Python Environment" in UI
111+
```
112+
113+
### Windows
114+
115+
```powershell
116+
# Run MSI installer (double-click or):
117+
msiexec /i Local.Browser.Agent_*.msi
118+
119+
# Run setup script
120+
cd "C:\Program Files\Local Browser Agent"
121+
.\SETUP.ps1
122+
123+
# Or use batch file
124+
.\SETUP.bat
125+
```
126+
127+
### Linux (Ubuntu/Debian)
128+
129+
```bash
130+
# Install DEB package
131+
sudo dpkg -i local-browser-agent_*.deb
132+
sudo apt-get install -f # Fix dependencies
133+
134+
# Run setup
135+
cd /opt/local-browser-agent # or wherever installed
136+
./SETUP.sh
137+
```
138+
139+
## Troubleshooting
140+
141+
### Build Fails on Specific Platform
142+
143+
1. Check the Actions tab for detailed logs
144+
2. Common issues:
145+
- **macOS**: Code signing (can be disabled for testing)
146+
- **Windows**: Missing Visual Studio Build Tools
147+
- **Linux**: Missing system libraries (webkit, gtk)
148+
149+
### Python Dependencies Not Installing
150+
151+
- Ensure `requirements.txt` (browser-agent) or `pyproject.toml` (local-agent) is up to date
152+
- Check uv installation in GitHub Actions logs
153+
- Verify Python 3.11 compatibility
154+
155+
### Large File Sizes
156+
157+
If installers become too large:
158+
1. Check `.taurignore` is excluding unnecessary files
159+
2. Ensure `.venv` directories are not bundled
160+
3. Review bundle configuration in `tauri.conf.json`
161+
162+
## Future Improvements
163+
164+
- [ ] Add code signing for macOS (requires Apple Developer account)
165+
- [ ] Add code signing for Windows (requires certificate)
166+
- [ ] Add auto-update functionality (Tauri updater)
167+
- [ ] Combine agents into unified local agent
168+
- [ ] Add Linux AppImage format
169+
- [ ] Add macOS Homebrew cask
170+
- [ ] Add Windows Chocolatey package
171+
172+
## Workflow Configuration Files
173+
174+
- `.github/workflows/release-browser-agent.yml` - Browser agent builds
175+
- `.github/workflows/release-local-agent.yml` - Local agent builds
176+
177+
## Support
178+
179+
For issues with the release process:
180+
1. Check GitHub Actions logs
181+
2. Review this documentation
182+
3. Open an issue in the repository
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: Release Browser Agent
2+
3+
on:
4+
push:
5+
tags:
6+
- 'browser-agent-v*' # Trigger on tags like browser-agent-v0.1.0
7+
workflow_dispatch: # Allow manual trigger
8+
9+
jobs:
10+
release:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
platform:
15+
- os: macos-latest
16+
target: aarch64-apple-darwin
17+
bundle: dmg
18+
- os: macos-latest
19+
target: x86_64-apple-darwin
20+
bundle: dmg
21+
- os: windows-latest
22+
target: x86_64-pc-windows-msvc
23+
bundle: msi
24+
- os: ubuntu-latest
25+
target: x86_64-unknown-linux-gnu
26+
bundle: deb
27+
28+
runs-on: ${{ matrix.platform.os }}
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: '20'
38+
cache: 'npm'
39+
cache-dependency-path: lambda/tools/local-browser-agent/ui/package-lock.json
40+
41+
- name: Setup Rust
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
targets: ${{ matrix.platform.target }}
45+
46+
- name: Install Linux dependencies
47+
if: matrix.platform.os == 'ubuntu-latest'
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install -y \
51+
libwebkit2gtk-4.0-dev \
52+
libgtk-3-dev \
53+
libayatana-appindicator3-dev \
54+
librsvg2-dev \
55+
patchelf
56+
57+
- name: Setup Python
58+
uses: actions/setup-python@v5
59+
with:
60+
python-version: '3.11'
61+
62+
- name: Install uv (Unix)
63+
if: matrix.platform.os != 'windows-latest'
64+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
65+
66+
- name: Install uv (Windows)
67+
if: matrix.platform.os == 'windows-latest'
68+
run: |
69+
irm https://astral.sh/uv/install.ps1 | iex
70+
echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
71+
shell: powershell
72+
73+
- name: Create Python venv and install dependencies
74+
working-directory: lambda/tools/local-browser-agent
75+
shell: bash
76+
run: |
77+
# Create venv in python/.venv
78+
uv venv python/.venv --python 3.11
79+
80+
# Activate and install dependencies
81+
if [ "$RUNNER_OS" == "Windows" ]; then
82+
source python/.venv/Scripts/activate
83+
else
84+
source python/.venv/bin/activate
85+
fi
86+
87+
# Install from requirements.txt
88+
uv pip install -r python/requirements.txt
89+
90+
# Install Playwright browsers
91+
playwright install chromium
92+
93+
echo "Python dependencies installed successfully"
94+
95+
- name: Install UI dependencies
96+
working-directory: lambda/tools/local-browser-agent/ui
97+
run: npm ci
98+
99+
- name: Build UI
100+
working-directory: lambda/tools/local-browser-agent/ui
101+
run: npm run build
102+
103+
- name: Build Tauri app
104+
uses: tauri-apps/tauri-action@v0
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
with:
108+
projectPath: lambda/tools/local-browser-agent/src-tauri
109+
tauriScript: cargo tauri
110+
tagName: ${{ github.ref_name }}
111+
releaseName: 'Local Browser Agent ${{ github.ref_name }}'
112+
releaseBody: |
113+
## Local Browser Agent Release
114+
115+
Cross-platform browser automation agent with Nova Act integration.
116+
117+
### Features
118+
- Browser automation via Nova Act
119+
- Profile management for session persistence
120+
- AWS Step Functions integration
121+
- Script executor with validation
122+
123+
### Installation
124+
- **macOS**: Open the DMG and drag to Applications
125+
- **Windows**: Run the MSI installer
126+
- **Linux**: Install the DEB package
127+
128+
### Setup
129+
After installation, run "Setup Python Environment" from the Configuration tab.
130+
131+
See README for full documentation.
132+
releaseDraft: true
133+
prerelease: false
134+
args: --target ${{ matrix.platform.target }}
135+
136+
- name: Upload Python scripts artifact
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: python-scripts-${{ matrix.platform.os }}
140+
path: |
141+
lambda/tools/local-browser-agent/python/*.py
142+
lambda/tools/local-browser-agent/python/requirements.txt

0 commit comments

Comments
 (0)