Skip to content

The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

ci: allow release branches cut from dev to target main

Zhuowei Wang8606ddfded6e
diff --git a/.github/workflows/main-pr-source.yml b/.github/workflows/main-pr-source.yml
index 97b7e8b..a558352 100644
--- a/.github/workflows/main-pr-source.yml
+++ b/.github/workflows/main-pr-source.yml
@@ -9,11 +9,25 @@ jobs:
require-dev-source:
runs-on: ubuntu-latest
steps:
- - name: Require dev branch
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Require dev or a release branch cut from dev
env:
HEAD_REF: ${{ github.head_ref }}
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
- if [ "$HEAD_REF" != "dev" ]; then
- echo "Pull requests into main must come from the dev branch."
+ if [ "$HEAD_REF" = "dev" ]; then
+ exit 0
+ fi
+
+ if [[ "$HEAD_REF" != release/* ]]; then
+ echo "Pull requests into main must come from dev or a release/* branch."
+ exit 1
+ fi
+
+ if ! git merge-base --is-ancestor "$HEAD_SHA" origin/dev; then
+ echo "Release branch head $HEAD_SHA is not on dev."
+ echo "Cut release/* branches from a dev commit and do not add commits to them."
exit 1
fi
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 174465e..036951a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -216,6 +216,20 @@ The current release behavior is:
| Push a `vX.Y.Z` tag | Publishes a stable release and marks it as Latest. The tagged commit must be reachable from `main`. |
| Push to `dev` or `main` without a version tag | Runs CI without creating a release. |
+Pull requests into `main` must come from `dev` or from a `release/*` branch whose
+head commit is already on `dev`. To release a specific dev commit, cut a release
+branch from it, merge that branch into `main` with a merge commit, then tag the
+merge commit:
+
+```bash
+git switch -c release/vX.Y.Z <dev-commit>
+git push -u origin release/vX.Y.Z
+gh pr create --base main --head release/vX.Y.Z --title "release: vX.Y.Z"
+# after merging with a merge commit
+git fetch origin && git tag -a vX.Y.Z origin/main -m "Release vX.Y.Z"
+git push origin vX.Y.Z
+```
+
Release jobs reuse the tested build and package `dist/out/` into
`ego-browser-<tag>.zip`. Notes are generated from merged PRs using
[release categories](.github/release.yml). The workflow publishes the SDK and