Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

ci: build and release the standalone companion

Emre Sokullu8d6ce3104533
diff --git a/.github/workflows/systray-build.yml b/.github/workflows/systray-build.yml
new file mode 100644
index 000000000..3be7b0674
--- /dev/null
+++ b/.github/workflows/systray-build.yml
@@ -0,0 +1,82 @@
+name: WebBrain Companion
+
+on:
+ push:
+ branches: [main]
+ tags: ["systray-v*"]
+ paths:
+ - "webbrain-systray/**"
+ - ".github/workflows/systray-build.yml"
+ pull_request:
+ paths:
+ - "webbrain-systray/**"
+ - ".github/workflows/systray-build.yml"
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: webbrain-systray
+ env:
+ CGO_ENABLED: "0"
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-go@v5
+ with:
+ go-version-file: webbrain-systray/go.mod
+ cache-dependency-path: webbrain-systray/go.sum
+
+ - name: Vet and test
+ run: |
+ go vet ./...
+ go test ./...
+
+ - name: Install NSIS (Windows installer)
+ run: sudo apt-get update -qq && sudo apt-get install -y -qq nsis
+
+ - name: Install rcodesign (ad-hoc signs the macOS app on Linux)
+ run: |
+ curl -fsSL -o "$RUNNER_TEMP/rcodesign.tar.gz" \
+ "https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.29.0/apple-codesign-0.29.0-x86_64-unknown-linux-musl.tar.gz"
+ tar -xzf "$RUNNER_TEMP/rcodesign.tar.gz" -C "$RUNNER_TEMP"
+ echo "RCODESIGN=$RUNNER_TEMP/apple-codesign-0.29.0-x86_64-unknown-linux-musl/rcodesign" >> "$GITHUB_ENV"
+
+ - name: Build packages
+ run: |
+ if [[ "$GITHUB_REF" == refs/tags/systray-v* ]]; then
+ export VERSION="${GITHUB_REF_NAME#systray-v}"
+ else
+ export VERSION="0.0.0-${GITHUB_SHA::7}"
+ fi
+ bash ./scripts/build.sh
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: webbrain-companion
+ path: webbrain-systray/dist/*
+ if-no-files-found: error
+
+ release:
+ if: startsWith(github.ref, 'refs/tags/systray-v')
+ needs: build
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/download-artifact@v4
+ with:
+ name: webbrain-companion
+ path: dist
+
+ - name: Draft a GitHub release with the packages
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh release create "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" \
+ --draft --title "WebBrain Companion ${GITHUB_REF_NAME#systray-v}" --generate-notes