Branch and Release Policy
Version: 0.1 Effective date: 2026-06-13 Status: Initial policy
Purpose
Section titled “Purpose”This policy makes dev the normal integration branch and keeps main as the
release branch. The goal is to let development move quickly on dev while
ensuring that every update to main intentionally creates a versioned release.
Branch Roles
Section titled “Branch Roles”| Ref | Role | Policy |
|---|---|---|
dev | Integration branch | Default branch. All normal pushes and pull requests target dev. |
main | Release branch | Promotion-only branch. Updating main starts release automation. |
v* tags | Release tags | Immutable release identifiers created by release automation or an approved release admin. |
Development Rules
Section titled “Development Rules”- All normal development work targets
dev. - Feature branches may be used, but their pull request base should be
dev. - Direct local pushes to
mainare blocked by the repository pre-push hook. - Force-pushes and deletions are not allowed on
dev. devcan receive direct pushes from maintainers for fast-moving integration work, but production promotion still happens throughmain.
Release Rules
Section titled “Release Rules”mainis updated only when a new release should be created.mainrequires a pull request, one approving review, stale review dismissal, and review-thread resolution.- Pushing to
mainstartsVersion Main Release. - The release workflow chooses the next version from checked-in version files
and existing
vMAJOR.MINOR.PATCHtags. - The workflow synchronizes
CMakeLists.txt,zepto_py/__init__.py, andweb/package.json. - The workflow creates and pushes
vX.Y.Z, which triggers the tag-basedReleaseworkflow. v*tags are protected from unauthorized creation, deletion, and non-fast-forward updates.
Version Policy
Section titled “Version Policy”Patch releases are automatic by default.
If the checked-in version files are ahead of the latest release tag, that checked-in version is published exactly. Otherwise, the latest tag’s patch component is incremented.
Minor or major releases must be prepared on dev by updating the version files
before promoting to main.
Required Repository Settings
Section titled “Required Repository Settings”The active repository configuration must include:
- Default branch:
dev. - Ruleset
Dev branch safety:- Target:
refs/heads/dev. - Rules: deletion protection, non-fast-forward protection.
- Target:
- Ruleset
Main release branch:- Target:
refs/heads/main. - Rules: deletion protection, non-fast-forward protection, pull request requirement, one approving review, stale review dismissal, review-thread resolution.
- Target:
- Ruleset
Release tags:- Target:
refs/tags/v*. - Rules: creation protection, deletion protection, non-fast-forward protection.
- Target:
Release Bot Policy
Section titled “Release Bot Policy”The organization currently disables write permission for the default
GITHUB_TOKEN. Because of that, Version Main Release must use
RELEASE_BOT_TOKEN.
The token owner must be a release bot or release-admin account with permission to:
- Push the generated version commit to
main. - Create
v*release tags. - Bypass the
mainandv*rulesets only for release automation.
The first-pass ruleset uses repository-admin bypass. After a dedicated release bot account or GitHub App is chosen, narrow the bypass actor from repository-admin to that bot.
Operating Procedure
Section titled “Operating Procedure”For normal work:
- Work on
devor a feature branch based ondev. - Push to
dev. - Let CI run.
For a release:
- Confirm
devis ready. - Open a promotion pull request from
devtomain. - Review and merge after required checks and review are complete.
- Confirm
Version Main Releasecreates the version commit andv*tag. - Confirm the tag-triggered
Releaseworkflow publishes artifacts.
Current Follow-ups
Section titled “Current Follow-ups”- Add
RELEASE_BOT_TOKENas a repository secret. - Replace repository-admin bypass with a narrower release bot bypass after the bot identity is selected.
- Decide whether
mainshould require named CI checks once the required check list is stable.