fix(browser-agent): Fix NDJSON protocol for Windows persistent sessions #95
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Browser Agent | |
| on: | |
| push: | |
| tags: | |
| - 'browser-agent-v*' # Trigger on tags like browser-agent-v0.1.0 | |
| workflow_dispatch: # Allow manual trigger | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| bundle: dmg | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| bundle: dmg | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| bundle: msi | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| bundle: deb | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: lambda/tools/local-browser-agent/ui/package-lock.json | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.platform.target }} | |
| - name: Setup MSVC (Windows) | |
| if: matrix.platform.os == 'windows-latest' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install NASM (Windows) | |
| if: matrix.platform.os == 'windows-latest' | |
| run: | | |
| choco install nasm -y | |
| echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| shell: powershell | |
| - name: Install Linux dependencies | |
| if: matrix.platform.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf \ | |
| libsoup2.4-dev | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv (Unix) | |
| if: matrix.platform.os != 'windows-latest' | |
| run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
| - name: Install uv (Windows) | |
| if: matrix.platform.os == 'windows-latest' | |
| run: | | |
| irm https://astral.sh/uv/install.ps1 | iex | |
| echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| shell: powershell | |
| - name: Create Python venv and install dependencies | |
| working-directory: lambda/tools/local-browser-agent | |
| shell: bash | |
| run: | | |
| # Create venv in temp directory (NOT in python/ to avoid bundling) | |
| # The app will create its own venv on first run via "Setup Python Environment" | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| TEMP_VENV="$RUNNER_TEMP/build-venv" | |
| else | |
| TEMP_VENV="/tmp/build-venv" | |
| fi | |
| uv venv "$TEMP_VENV" --python 3.11 | |
| # Activate and install dependencies | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| source "$TEMP_VENV/Scripts/activate" | |
| else | |
| source "$TEMP_VENV/bin/activate" | |
| fi | |
| # Install from requirements.txt (just to validate it works) | |
| uv pip install -r python/requirements.txt | |
| # Install Playwright browsers (just to validate) | |
| playwright install chromium | |
| echo "Python dependencies validated successfully" | |
| echo "Note: venv not bundled - users will create it via Setup Python Environment" | |
| - name: Install UI dependencies | |
| working-directory: lambda/tools/local-browser-agent/ui | |
| run: npm ci | |
| - name: Build UI | |
| working-directory: lambda/tools/local-browser-agent/ui | |
| run: npm run build | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --version '^1.5.0' | |
| - name: Set Windows environment variables | |
| if: matrix.platform.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| echo "CARGO_TARGET_DIR=D:\t" >> $env:GITHUB_ENV | |
| echo "CARGO_INCREMENTAL=0" >> $env:GITHUB_ENV | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| projectPath: lambda/tools/local-browser-agent/src-tauri | |
| tauriScript: cargo tauri | |
| tagName: ${{ github.ref_name }} | |
| releaseName: 'Local Browser Agent ${{ github.ref_name }}' | |
| releaseBody: | | |
| ## Local Browser Agent Release | |
| Cross-platform browser automation agent with Nova Act integration. | |
| ### Features | |
| - Browser automation via Nova Act | |
| - Profile management for session persistence | |
| - AWS Step Functions integration | |
| - Script executor with validation | |
| ### Installation | |
| - **macOS**: Open the DMG and drag to Applications | |
| - **Windows**: Run the MSI installer | |
| - **Linux**: Install the DEB package | |
| ### Setup | |
| After installation, run "Setup Python Environment" from the Configuration tab. | |
| See README for full documentation. | |
| releaseDraft: true | |
| prerelease: false | |
| args: --target ${{ matrix.platform.target }} | |
| - name: Upload Python scripts artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-scripts-${{ matrix.platform.target }} | |
| path: | | |
| lambda/tools/local-browser-agent/python/*.py | |
| lambda/tools/local-browser-agent/python/requirements.txt |