An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.
TypeScript agentic-browseragentic-browsingagy-cliaiai-agentai-browser-extensionai-toolsbrave-extensionbrowser-agentbrowser-automationbrowser-extensionbrowser-usebrowserskillchrome-extensionclaude-codecodexfirefox-addonmcp-servernanobrowserweb-automation
ci(windows): build and test the Windows app on every change, and release an installer for each architecture with the feed installed copies update from, signed for the updater and for SmartScreen once its secrets exist
Shahriar80bae03f8323
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 2aaf4dc..0b3ad03 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -92,3 +92,37 @@ jobs:run: |swift buildswift test++ # The Windows app's Rust half, built and tested where it runs: the registry, the PATH, the job+ # object and the tray only compile on Windows. Its UI is type-checked and tested by `check`.+ windows-app:+ runs-on: windows-latest+ defaults:+ run:+ shell: bash+ steps:+ - name: Keep line endings as committed+ run: git config --global core.autocrlf false++ - uses: actions/checkout@v5++ - uses: actions/setup-node@v5+ with:+ node-version: 24++ - uses: Swatinem/rust-cache@v2+ with:+ workspaces: src/windows++ - name: Install dependencies+ run: |+ yarn_bin=$(sed -n 's/^yarnPath: *//p' .yarnrc.yml)+ echo "YARN=$yarn_bin" >> "$GITHUB_ENV"+ node "$yarn_bin" install --immutable++ - name: Build the window the app embeds+ run: node "$YARN" win:ui++ - name: Build and test the app and its launcher+ working-directory: src/windows+ run: cargo test --workspace --lockeddiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex c94f66f..7098892 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -3,7 +3,7 @@# The tag is both the trigger and the source of truth. CI bumps nothing and tags nothing:# it rebuilds the tagged commit from scratch, checks the build agrees with the tag, and# publishes the three store archives under a release of that name, then the Mac app, the-# signed Firefox add-on and the MCP Registry entry in their own jobs. So the whole local half+# Windows app, the signed Firefox add-on and the MCP Registry entry in their own jobs. So the whole local half# of a release is "bump both package.json files and server.json, commit, tag vX.Y.Z, push# the tag".#@@ -294,6 +294,111 @@ jobs:GH_TOKEN: ${{ github.token }}run: gh release upload "$GITHUB_REF_NAME" "dist/mac/Browsentic-${GITHUB_REF_NAME#v}.dmg" --clobber+ # ---------------------------------------------------------------------------------------+ # The Windows app, beside the Mac one: a per-user installer for each architecture, with the+ # signature its in-app updater checks, then the latest.json that installed copies poll. A job of+ # its own for the same reason as the Mac app: a failure here leaves a release without an+ # installer, never an installer without a release.+ #+ # The updater's key comes from two repository secrets, TAURI_SIGNING_PRIVATE_KEY and+ # TAURI_SIGNING_PRIVATE_KEY_PASSWORD; its public half is in tauri.conf.json, and a release built+ # without it could never update itself, so the job fails instead. Authenticode waits on Azure+ # Trusted Signing: until AZURE_* secrets exist the installer is unsigned, SmartScreen warns on a+ # downloaded copy, and the one-line PowerShell install, which leaves no download mark, does not.+ # ---------------------------------------------------------------------------------------+ windows-app:+ needs: release+ runs-on: windows-latest+ strategy:+ matrix:+ include:+ - arch: x64+ target: x86_64-pc-windows-msvc+ - arch: arm64+ target: aarch64-pc-windows-msvc+ defaults:+ run:+ shell: bash+ steps:+ - name: Keep line endings as committed+ run: git config --global core.autocrlf false++ - uses: actions/checkout@v5++ - uses: actions/setup-node@v5+ with:+ node-version: 24++ - name: Add the Rust target+ run: rustup target add ${{ matrix.target }}++ - uses: Swatinem/rust-cache@v2+ with:+ workspaces: src/windows+ key: ${{ matrix.target }}++ - name: Build the extension and the daemon the app carries+ run: |+ yarn_bin=$(sed -n 's/^yarnPath: *//p' .yarnrc.yml)+ echo "YARN=$yarn_bin" >> "$GITHUB_ENV"+ node "$yarn_bin" install --immutable+ node "$yarn_bin" --cwd src/daemon install --immutable+ node "$yarn_bin" build+ node "$yarn_bin" daemon:build++ - name: Build and sign the installer+ env:+ TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}+ AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}+ AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}+ AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}+ AZURE_ENDPOINT: ${{ secrets.AZURE_ENDPOINT }}+ AZURE_CODE_SIGNING_NAME: ${{ secrets.AZURE_CODE_SIGNING_NAME }}+ AZURE_CERT_PROFILE_NAME: ${{ secrets.AZURE_CERT_PROFILE_NAME }}+ run: |+ if [ -z "$TAURI_SIGNING_PRIVATE_KEY" ]; then+ echo "::error::no TAURI_SIGNING_PRIVATE_KEY secret: an installer the updater cannot verify would strand every copy on this version"+ exit 1+ fi+ authenticode=()+ if [ -n "$AZURE_CLIENT_ID" ]; then+ cargo install --locked trusted-signing-cli+ sign="trusted-signing-cli -e $AZURE_ENDPOINT -a $AZURE_CODE_SIGNING_NAME -c $AZURE_CERT_PROFILE_NAME -d Browsentic %1"+ authenticode=(--config "{\"bundle\":{\"windows\":{\"signCommand\":\"$sign\"}}}")+ else+ echo "::warning::no AZURE_CLIENT_ID secret, so this installer is unsigned and SmartScreen warns on a downloaded copy"+ fi+ node "$YARN" tauri build --target ${{ matrix.target }} "${authenticode[@]}"+ version="${GITHUB_REF_NAME#v}"+ bundle="src/windows/target/${{ matrix.target }}/release/bundle/nsis"+ mkdir -p dist/windows+ cp "$bundle/Browsentic_${version}_${{ matrix.arch }}-setup.exe" "dist/windows/Browsentic-${version}-${{ matrix.arch }}-setup.exe"+ cp "$bundle/Browsentic_${version}_${{ matrix.arch }}-setup.exe.sig" "dist/windows/Browsentic-${version}-${{ matrix.arch }}-setup.exe.sig"++ - name: Attach the installer to the release+ env:+ GH_TOKEN: ${{ github.token }}+ run: gh release upload "$GITHUB_REF_NAME" dist/windows/* --clobber++ windows-feed:+ needs: windows-app+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v5++ - uses: actions/setup-node@v5+ with:+ node-version: 24++ - name: Point installed Windows apps at this release+ env:+ GH_TOKEN: ${{ github.token }}+ run: |+ gh release download "$GITHUB_REF_NAME" --pattern 'Browsentic-*-setup.exe.sig' --dir signatures+ node scripts/windows-latest-json.ts "${GITHUB_REF_NAME#v}" signatures > latest.json+ gh release upload "$GITHUB_REF_NAME" latest.json --clobber+# ---------------------------------------------------------------------------------------# The Firefox add-on release Firefox will actually install: the firefox zip, signed by# addons.mozilla.org on the unlisted channel, plus the updates.json that installed copiesdiff --git a/scripts/release-notes.mjs b/scripts/release-notes.mjsindex 4debb73..f8272be 100644--- a/scripts/release-notes.mjs+++ b/scripts/release-notes.mjs@@ -100,6 +100,15 @@ function renderNotes(version, commits, prevTag) {`The \`Browsentic-${version}.dmg\` below is the same app. It is not notarized yet, so a downloaded copy is blocked`,'on first open: **System Settings → Privacy & Security → Open Anyway**. The line above avoids that.','',+ '**Windows 10 or 11** (experimental) — installs the app, and the app installs everything else, Node included:',+ '',+ '```powershell',+ 'irm https://browsentic.com/install.ps1 | iex',+ '```',+ '',+ `The \`Browsentic-${version}-x64-setup.exe\` and \`-arm64-setup.exe\` below are the same app. They are not code-signed`,+ 'yet, so SmartScreen warns on a downloaded copy: **More info → Run anyway**. The line above avoids that.',+ '','**Any platform** — macOS, Windows or Linux, with Node.js 20 or newer:','','```sh',@@ -121,7 +130,7 @@ function renderNotes(version, commits, prevTag) {'','Already running an older version? `npx browsentic update` refreshes the command and the','extension in place and keeps your browser paired. Press ↻ on the Browsentic card afterwards;',- 'Firefox needs nothing pressed, and the Mac app offers the update on its Overview tab.',+ 'Firefox needs nothing pressed, and the Mac and Windows apps offer the update on their Overview tab.','','<details><summary>From the zips, or from source</summary>','',diff --git a/scripts/windows-latest-json.ts b/scripts/windows-latest-json.tsnew file mode 100644index 0000000..d49efa4--- /dev/null+++ b/scripts/windows-latest-json.ts@@ -0,0 +1,41 @@+// Writes the latest.json every installed Windows app polls (tauri.conf.json → plugins.updater): the+// version, and for each architecture the installer's URL on the GitHub release and the signature the+// app checks it against. The release workflow runs it once both installers are attached:+//+// node scripts/windows-latest-json.ts <version> <folder with the .sig files> > latest.json++import { readFileSync } from 'node:fs';+import { join } from 'node:path';++const REPO = 'imshaikot/browsentic';+const ARCHITECTURES = { 'windows-x86_64': 'x64', 'windows-aarch64': 'arm64' } as const;++const [version, signatures] = process.argv.slice(2);+if (!version || !signatures) {+ console.error('usage: windows-latest-json.ts <version> <folder with the .sig files>');+ process.exit(1);+}++const installerName = (release: string, arch: string) => `Browsentic-${release}-${arch}-setup.exe`;++const platforms = Object.fromEntries(+ Object.entries(ARCHITECTURES).map(([platform, arch]) => {+ const installer = installerName(version, arch);+ return [+ platform,+ {+ signature: readFileSync(join(signatures, `${installer}.sig`), 'utf8').trim(),+ url: `https://github.com/${REPO}/releases/download/v${version}/${installer}`,+ },+ ];+ }),+);++const feed = {+ version,+ notes: `https://github.com/${REPO}/releases/tag/v${version}`,+ pub_date: new Date().toISOString(),+ platforms,+};++process.stdout.write(`${JSON.stringify(feed, null, 2)}\n`);