feat: automate version releases

This commit is contained in:
Lan committed 2026-07-11 21:49:04 +08:00
1 parent 818dd47b2a
commit ee8f9082ab
16 files changed
+305 -19

No files matched your search

+2
View File
@@ -55,6 +55,7 @@ export default defineConfig({
{ text: '存储配置', link: '/guide/storage' },
{ text: '安全设置', link: '/guide/security' },
{ text: '系统配置', link: '/guide/configuration' },
{ text: '版本发布', link: '/guide/releasing' },
],
},
],
@@ -148,6 +149,7 @@ export default defineConfig({
text: 'System Configuration',
link: '/en/guide/configuration',
},
{ text: 'Releasing', link: '/en/guide/releasing' },
],
},
],
+2
View File
@@ -1,5 +1,7 @@
## [Unreleased]
<!-- Current release: 2.4.0 x-release-please-version -->
### Added
- Added a global storage capacity limit with concurrency-safe reservations for regular, chunked, presigned, and admin file uploads.
+25
View File
@@ -0,0 +1,25 @@
# Releasing
The project uses Semantic Versioning and Conventional Commits.
Complete these settings once in both GitHub repositories:
- In `Settings → Actions → General → Workflow permissions`, grant read/write
access and allow GitHub Actions to create pull requests.
- Keep squash merging enabled. The release workflow waits for required checks
before merging the release pull request.
- Add `DOCKER_USERNAME` and `DOCKER_PASSWORD` Actions secrets to the backend repository.
1. Merge commits using Conventional Commit types such as `feat:` and `fix:` into the default branch.
2. Release Please creates and merges the release pull request and updates `VERSION` and the changelog.
3. The workflow then creates `vX.Y.Z`, a GitHub Release, and dispatches the production image build.
4. Releases publish `X.Y.Z`, `X.Y`, and `latest`; branches publish `dev` or `edge-*` images.
5. Each image build resolves the latest commit from both frontend default branches automatically.
Every `fix:`, `feat:`, or breaking change merged into the default branch therefore
creates a Patch, Minor, or Major release automatically. Non-release commits such
as `docs:` and `chore:` do not publish a release on their own.
The backend runtime version comes from `VERSION`. Container branch builds inject a
commit-qualified development version through `APP_VERSION`; release tags must exactly
match `VERSION`. OCI image labels record the resolved backend and frontend commits for traceability.
+23
View File
@@ -0,0 +1,23 @@
# 版本发布
项目采用 Semantic Versioning 和 Conventional Commits 管理版本。
首次启用时,需要在两个 GitHub 仓库完成以下设置:
- `Settings → Actions → General → Workflow permissions` 选择读写权限,并允许
GitHub Actions 创建 Pull Request。
- 保持 Squash merge 可用;自动发布工作流会等待必需检查通过后合并发布 PR。
- 后端仓库配置 `DOCKER_USERNAME` 和 `DOCKER_PASSWORD` Actions Secrets。
1. 日常提交使用 `feat:`、`fix:` 等 Conventional Commits 前缀并合入主分支。
2. Release Please 自动创建并合并发布 PR,更新 `VERSION` 和更新日志。
3. 工作流随后自动创建 `vX.Y.Z`、GitHub Release 并触发正式镜像构建。
4. 正式镜像发布 `X.Y.Z`、`X.Y` 和 `latest`;分支镜像使用 `dev` 或 `edge-*`。
5. 镜像构建时自动读取两个前端仓库默认分支的最新提交,无需手工同步版本。
因此每次合入主分支的 `fix:`、`feat:` 或破坏性变更都会自动产生对应的
Patch、Minor 或 Major 版本。`docs:`、`chore:` 等不影响版本的提交不会单独发版。
后端运行版本来自 `VERSION`。容器分支构建通过 `APP_VERSION` 注入带提交号的
开发版本;正式标签必须与 `VERSION` 完全一致。Docker 镜像的 OCI 标签还记录
后端和两个前端仓库当次解析到的精确提交,便于定位构建内容。