Skip to content

ci: adopt dev trunk with promotion-only main branch - #5

Merged
CN059 merged 1 commit into
devfrom
chore/dev-main-branching
Sep 11, 2026
Merged

CN059 merged 1 commit into
devfrom
chore/dev-main-branching

Conversation

@CN059

@CN059 CN059 commented Sep 11, 2026

Copy link
Copy Markdown
Member

把仓库从「单 main」正式切换为「dev 主干 + main 发布账本」。

改动

  • ci.yml:触发分支改为 [dev, main](默认分支切到 dev 后,push dev 原来是没有 CI 的);containers job 加了条件,只在 PR 和 main 上跑,dev 的日常 push 只跑 test。
  • release.yml:verify job 增加 ancestry 守卫,tag 不是 main 祖先时直接失败,防止在 dev 提交上误打 tag 触发发布。
  • docs/branching.md(新增):分支职责、日常开发、晋升、hotfix 回合并规则。
  • docs/releasing.md:重写为「先晋升 dev→main,再在 merge commit 上打 tag」。
  • README.md:文档导航加「分支模型」。

说明

main 会因为晋升产生 merge commit,因此分支保护不要开 "Require linear history"。

dev becomes the default branch and integration trunk; main becomes the
release branch that only receives promotion PRs from dev and carries the
version tags.

- ci: run test on pushes to dev and main, keep the expensive container
  builds on PRs and main only
- release: refuse to publish when the pushed tag is not an ancestor of
  main, so an accidental tag on a dev commit cannot ship
- docs: add docs/branching.md and rewrite docs/releasing.md around the
  promote-then-tag flow
@CN059
CN059 merged commit f52f0a7 into dev Sep 11, 2026
2 checks passed
@CN059
CN059 deleted the chore/dev-main-branching branch September 11, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant