Skip to content

Release and Branch Workflow

Zhiyuan Tang edited this page Oct 28, 2026 · 1 revision

This page describes how the Realtek Zephyr SDK is released and how its branches are maintained. For the meaning of the version number itself, see Versioning.

Manifest Branches

The realtek-zephyr-project manifest repo keeps one long-lived branch per upstream Zephyr major.minor version, named rtk-v<major>.<minor>-branch (e.g., rtk-v3.7-branch, rtk-v4.4-branch). Each branch is bound to one value of MM.

Development and nightly tests run on that branch, whose west.yml tracks the branches of the projects it references (floating revisions, e.g., realtek-main-v4.4 for zephyr).

  • A new rtk-v<major>.<minor>-branch is created only when moving to a new upstream major.minor version. Within the same major.minor, releases are tags on the existing branch.
  • A separate maintenance branch for an old release is only created on demand, when a patch is needed for a previous mm line.

Release Process

To publish a release:

  1. Pick the project revisions to release, preferably the combination that passed the latest nightly test (west manifest --freeze).
  2. Create a commit on top of the branch that changes only west.yml, pinning zephyr, hal_realtek and mcuboot to those SHAs. Keep the original branch name as a comment next to each SHA.
  3. Create an annotated tag {upstream-tag}-rtk-MM.mm.pp on that commit, and push only the tag. The branch itself keeps its floating west.yml.
  4. Optionally, in each pinned repo (zephyr, hal_realtek, mcuboot), create a tag with the same name on the pinned SHA for traceability. Tagging is not required as long as the pinned SHA stays on a protected branch (no force-push, no deletion).

Release tags are created from released upstream tags only (no -rc tags or bare commits).

Commands

The release commit is created on a detached HEAD, so no branch moves and the nightly test keeps using the floating west.yml:

git fetch origin
git checkout --detach origin/rtk-v4.4-branch

# edit west.yml: pin zephyr / hal_realtek / mcuboot to SHAs

git commit -am "Release v4.4.0-rtk-01.01.00: pin zephyr/hal_realtek/mcuboot"
git tag -a v4.4.0-rtk-01.01.00 -m "Release v4.4.0-rtk-01.01.00"
git push origin v4.4.0-rtk-01.01.00      # push only the tag

git checkout rtk-v4.4-branch

The release commit is a leaf off the branch. GitHub may show "this commit does not belong to any branch" on the tag page. This is expected. List releases with git tag -l 'v4.4.*'.

Users can reproduce a release with:

west init -m https://github.com/rtkconnectivity/realtek-zephyr-project --mr v4.4.0-rtk-01.01.00 ws
cd ws && west update

Zephyr Branch Rules

The zephyr repo carries Realtek commits on top of an upstream Zephyr release tag. Release manifests pin SHAs of this repo, so a published SHA must never change or become unreachable.

When updating to a new upstream tag (e.g., v4.4.0 → v4.4.1):

  1. Create a new, clean branch from the new upstream tag (e.g., realtek-main-v4.4.1 from v4.4.1).
  2. Rebase the Realtek commits from the old branch (e.g., realtek-main-v4.4) onto the new branch.
  3. Update the zephyr revision in west.yml of the corresponding rtk-v<major>.<minor>-branch to the new branch, once the nightly test passes on it.
  4. Keep the old branch as it is. It stays frozen as the history of the previous upstream tag, and the SHAs pinned by earlier releases stay reachable on it.

Not allowed:

  • ❌ Cherry-picking upstream fix commits onto the old branch to emulate the new upstream tag
  • ❌ Rebasing the old branch onto the new upstream tag and force-pushing it

Both change the SHAs of commits that released manifests already pin. Zephyr branches must be protected against force-push and deletion.

The rebased Realtek commits get new SHAs on the new branch. This is expected, because the new branch is a different line. Released manifests still point at the old branch.

Example: v4.4.0 → v4.4.1

git checkout -b realtek-main-v4.4.1 realtek-main-v4.4
git rebase --onto v4.4.1 v4.4.0

--onto moves only the Realtek commits on top of v4.4.0, without dragging upstream history along.

Verify the result before switching the manifest:

# Compare old and new Realtek patch stacks commit by commit
git range-diff v4.4.0..realtek-main-v4.4 v4.4.1..realtek-main-v4.4.1

Only differences caused by conflict resolution are expected. No commit should be dropped or altered otherwise.

Same rules for hal_realtek and mcuboot

hal_realtek_v4.4 and v4.4-bee should also be protected against force-push and deletion, so that pinned SHAs stay reachable.

Clone this wiki locally