Skip to content

Avoid Brave CAPTCHA for Agentic research #24

Avoid Brave CAPTCHA for Agentic research

Avoid Brave CAPTCHA for Agentic research #24

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+"
permissions:
contents: write
jobs:
package:
name: Package Windows release
runs-on: windows-latest
env:
CARGO_TERM_COLOR: always
LIBCLANG_PATH: C:\Program Files\LLVM\bin
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Detect package-affecting changes
id: package_changes
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$event = Get-Content -LiteralPath $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json
$before = [string]$event.before
if (-not $before -or $before -match "^0+$") {
"package_changed=true" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
"No previous tag target was available; packaging is required."
exit 0
}
git cat-file -e "$before^{commit}"
if ($LASTEXITCODE -ne 0) {
throw "Previous release tag target is unavailable in the checkout: $before"
}
$changed = @(git diff --name-only $before $env:GITHUB_SHA)
if ($LASTEXITCODE -ne 0) {
throw "Could not diff release tag update."
}
$packageChanged = $false
foreach ($path in $changed) {
if (
$path -like "site/*" -or
$path -eq "scripts/validate_site.mjs" -or
$path -eq ".github/workflows/pages.yml" -or
$path -eq ".github/workflows/release.yml"
) {
continue
}
$packageChanged = $true
break
}
"package_changed=$($packageChanged.ToString().ToLowerInvariant())" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
if ($packageChanged) {
"Windows release assets are affected by this tag update."
} else {
"Only site/checksum/workflow metadata changed; keeping existing v1 assets."
}
- name: Set up Node.js
if: steps.package_changes.outputs.package_changed == 'true'
uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
- name: Set up Python
if: steps.package_changes.outputs.package_changed == 'true'
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install LLVM for whisper-rs bindgen
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: |
choco install llvm -y --no-progress
"C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Install Rust components
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: rustup component add rustfmt clippy
- name: Install Node dependencies
if: steps.package_changes.outputs.package_changed == 'true'
run: npm ci
- name: Provision pinned Hermes runtimes
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: |
python -m pip install uv
.\scripts\provision_hermes_acp.ps1
.\scripts\provision_iris_browser.ps1
- name: Validate source
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: |
cargo fmt --all -- --check
cargo build --workspace
cargo test --workspace
cargo clippy --workspace -- -D warnings
npm run test:voice
npm run test:python
cargo run -p xtask
cargo run -p iris-runtime -- --dashboard-json
git diff --check
- name: Restore release model assets
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
$ErrorActionPreference = "Stop"
$bootstrap = Join-Path $PWD "release\bootstrap"
$extract = Join-Path $bootstrap "v1"
New-Item -ItemType Directory -Force -Path $bootstrap | Out-Null
gh release download v1 --repo $env:GITHUB_REPOSITORY --pattern iris-windows.zip --dir $bootstrap --clobber
Expand-Archive -LiteralPath (Join-Path $bootstrap "iris-windows.zip") -DestinationPath $extract -Force
if (-not (Test-Path -LiteralPath (Join-Path $extract "models") -PathType Container)) {
throw "v1 release ZIP did not contain models."
}
Copy-Item -LiteralPath (Join-Path $extract "models") -Destination (Join-Path $PWD "models") -Recurse -Force
Get-ChildItem -LiteralPath (Join-Path $PWD "models") -Recurse | Select-Object FullName, Length
- name: Package release ZIP
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: .\scripts\package_windows_release.ps1
- name: Smoke test release ZIP
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: .\scripts\test_windows_release_download.ps1
- name: Smoke test beginner installer bundle
if: steps.package_changes.outputs.package_changed == 'true'
shell: pwsh
run: .\scripts\test_windows_beginner_installer.ps1
- name: Upload release assets
if: steps.package_changes.outputs.package_changed == 'true'
uses: softprops/action-gh-release@v3
with:
body: |
## Windows install
1. Download `iris-windows-installer.zip`.
2. Extract the ZIP.
3. Double-click `Install Iris.bat`.
4. Follow the setup wizard.
The installer verifies the packaged payload before installation.
Advanced users can use `iris-windows.zip` as the portable package.
files: |
release/dist/iris-windows.zip
release/dist/iris-windows.zip.sha256
release/dist/iris-windows-installer.zip
release/dist/iris-windows-installer.zip.sha256
release/dist/install-iris-windows.ps1
release/dist/install-iris-windows.ps1.sha256