|
| 1 | +# Release Format |
| 2 | + |
| 3 | +本文档约束本仓库后续 GitHub Release 的命名、正文结构、发布产物和校验说明格式。 |
| 4 | + |
| 5 | +## Version Tags |
| 6 | + |
| 7 | +正式 release 必须使用 `vX.Y.Z` 格式,例如 `v0.5.1`。 |
| 8 | + |
| 9 | +发布前需要同步更新版本号: |
| 10 | + |
| 11 | +- `Cargo.toml` 的 `package.version` |
| 12 | +- `package.json` 的 `version` |
| 13 | + |
| 14 | +Git tag 应使用 annotated tag,tag message 使用: |
| 15 | + |
| 16 | +```text |
| 17 | +Release vX.Y.Z |
| 18 | +``` |
| 19 | + |
| 20 | +## Release Title |
| 21 | + |
| 22 | +正式 release 标题使用 tag 本身: |
| 23 | + |
| 24 | +```text |
| 25 | +vX.Y.Z |
| 26 | +``` |
| 27 | + |
| 28 | +例如: |
| 29 | + |
| 30 | +```text |
| 31 | +v0.5.1 |
| 32 | +``` |
| 33 | + |
| 34 | +## Release Body |
| 35 | + |
| 36 | +正式 release 正文必须使用以下四个二级标题,并保持顺序不变: |
| 37 | + |
| 38 | +```md |
| 39 | +## Changes |
| 40 | + |
| 41 | +- ... |
| 42 | + |
| 43 | +## Release assets |
| 44 | + |
| 45 | +- `codex-gateway-darwin-arm64.tar.gz` |
| 46 | +- `codex-gateway-darwin-arm64.tar.gz.sha256` |
| 47 | +- `codex-gateway-linux-amd64.tar.gz` |
| 48 | +- `codex-gateway-linux-amd64.tar.gz.sha256` |
| 49 | + |
| 50 | +## Container image |
| 51 | + |
| 52 | +- `ghcr.io/labring/codex-gateway:latest` |
| 53 | +- `ghcr.io/labring/codex-gateway:vX.Y.Z` |
| 54 | + |
| 55 | +## Validation |
| 56 | + |
| 57 | +- ... |
| 58 | +``` |
| 59 | + |
| 60 | +## Changes |
| 61 | + |
| 62 | +`Changes` 部分用 bullet list 描述本次 release 的用户可见变化和重要内部变化。 |
| 63 | + |
| 64 | +要求: |
| 65 | + |
| 66 | +- 每条变更使用一句完整说明。 |
| 67 | +- 优先写行为变化、API 变化、运行时变化、镜像变化、兼容性变化。 |
| 68 | +- 不需要逐条复制 commit message。 |
| 69 | +- 如果包含 breaking change,需要在对应 bullet 中明确说明。 |
| 70 | + |
| 71 | +## Release Assets |
| 72 | + |
| 73 | +正式 release 应上传以下 assets: |
| 74 | + |
| 75 | +- `codex-gateway-darwin-arm64.tar.gz` |
| 76 | +- `codex-gateway-darwin-arm64.tar.gz.sha256` |
| 77 | +- `codex-gateway-linux-amd64.tar.gz` |
| 78 | +- `codex-gateway-linux-amd64.tar.gz.sha256` |
| 79 | + |
| 80 | +正文中的 asset 文件名必须使用反引号包裹,并与实际上传文件名完全一致。 |
| 81 | + |
| 82 | +## Container Image |
| 83 | + |
| 84 | +正式 release 正文至少列出以下镜像: |
| 85 | + |
| 86 | +- `ghcr.io/labring/codex-gateway:latest` |
| 87 | +- `ghcr.io/labring/codex-gateway:vX.Y.Z` |
| 88 | + |
| 89 | +推送 `vX.Y.Z` tag 后,GitHub Actions 会额外发布 semver 相关镜像 tag: |
| 90 | + |
| 91 | +- `X.Y.Z` |
| 92 | +- `X.Y` |
| 93 | +- `X` |
| 94 | +- `latest` |
| 95 | + |
| 96 | +如需在 `Changes` 中说明镜像发布范围,可以写明完整 tag 集合,例如: |
| 97 | + |
| 98 | +```md |
| 99 | +- Publish GHCR image tags for `v0.5.1`, `0.5.1`, `0.5`, `0`, and `latest`. |
| 100 | +``` |
| 101 | + |
| 102 | +## Validation |
| 103 | + |
| 104 | +`Validation` 部分必须列出本次 release 实际完成的校验和构建。 |
| 105 | + |
| 106 | +常见条目包括: |
| 107 | + |
| 108 | +- `cargo fmt --check` passed. |
| 109 | +- `cargo check` passed. |
| 110 | +- `cargo test` passed. |
| 111 | +- Darwin arm64 release binaries were built locally and packaged with the static web assets. |
| 112 | +- Linux amd64 release binaries were built from the repository Docker builder target and packaged with the static web assets. |
| 113 | +- GitHub Actions Container workflow passed for `vX.Y.Z`. |
| 114 | + |
| 115 | +只写实际执行过并通过的检查。不要把未执行的检查写进 release notes。 |
| 116 | + |
| 117 | +## Prereleases |
| 118 | + |
| 119 | +预发布可以使用描述性 tag,例如: |
| 120 | + |
| 121 | +```text |
| 122 | +rust-preview-YYYYMMDD-N |
| 123 | +``` |
| 124 | + |
| 125 | +预发布标题可以使用可读名称,例如: |
| 126 | + |
| 127 | +```text |
| 128 | +Rust preview YYYY-MM-DD |
| 129 | +``` |
| 130 | + |
| 131 | +预发布正文可以使用自由格式,但必须说明: |
| 132 | + |
| 133 | +- 对应 commit 或日期。 |
| 134 | +- 包含哪些 assets。 |
| 135 | +- 目标平台。 |
| 136 | +- 重要运行时要求。 |
| 137 | +- 与正式 release 的差异。 |
| 138 | + |
| 139 | +## Historical Notes |
| 140 | + |
| 141 | +本仓库历史格式演进如下: |
| 142 | + |
| 143 | +- `v0.2.0` 使用 GitHub 自动生成 release notes,没有固定四段结构,也没有二进制 assets。 |
| 144 | +- `rust-preview-20260410-1` 是 macOS arm64 Rust 预览包,使用自由格式并标记为 prerelease。 |
| 145 | +- 从 `v0.3.0` 起,正式 release 使用 `Changes`、`Release assets`、`Container image`、`Validation` 四段结构。 |
| 146 | +- `v0.5.1` 是当前推荐格式基准:asset 和 image 均使用反引号,`Validation` 明确列出测试和各平台构建来源。 |
0 commit comments