feat(deploy): SemVer 版本管理 + 自动化发版流水线
- deploy.yml: tag 触发(v*.*.*),四阶段调脚本(compile/test/release/deploy) - manual.yml: workflow_dispatch 支持手动回滚,checkout 指定 tag - scripts/ci/compile.sh: 构建 Go 二进制 + Flutter Web,打包 dist/ - scripts/ci/test.sh: go test + flutter analyze - scripts/ci/release.sh: 解析 CHANGELOG.md → 更新 version.yaml → 创建 Forgejo Release - scripts/ci/deploy.sh: 从 Release 下载产物(自动/手动均可)→ 部署到 EC2 - CHANGELOG.md: Keep a Changelog 格式,初始 v1.0.0 条目 - backend: GetRelease 改读 version.yaml,移除 ENV 变量依赖 - backend/config/version.yaml: 重置为 v1.0.0 - web/download.html: 动态拉取 /api/v1/public/release 展示版本号和更新内容 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-4
@@ -954,15 +954,15 @@ footer {
|
||||
</p>
|
||||
|
||||
<div class="changelog">
|
||||
<!-- v1.6.2 -->
|
||||
<!-- 当前版本(由 JS 动态更新) -->
|
||||
<div class="changelog-entry current">
|
||||
<div class="changelog-meta">
|
||||
<div class="changelog-version">v1.6.2</div>
|
||||
<div class="changelog-date">2026-05-15</div>
|
||||
<div class="changelog-version" id="version-badge">...</div>
|
||||
<div class="changelog-date" id="release-date">-</div>
|
||||
<span class="changelog-tag">当前版本</span>
|
||||
</div>
|
||||
<div class="changelog-body">
|
||||
<h3>多仓库联动盘点与权限增强</h3>
|
||||
<h3 id="release-notes">加载中...</h3>
|
||||
<div class="changelog-cat">
|
||||
<div class="changelog-cat-label"><span class="dot feature"></span>新功能</div>
|
||||
<ul>
|
||||
@@ -1193,8 +1193,23 @@ function renderNav() {
|
||||
if (window.lucide) lucide.createIcons();
|
||||
}
|
||||
|
||||
function loadReleaseInfo() {
|
||||
fetch('https://jiu.51yanmei.com/api/v1/public/release')
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) {
|
||||
var badge = document.getElementById('version-badge');
|
||||
var notes = document.getElementById('release-notes');
|
||||
var date = document.getElementById('release-date');
|
||||
if (badge && data.version) badge.textContent = 'v' + data.version;
|
||||
if (notes && data.release_notes) notes.textContent = data.release_notes;
|
||||
if (date) date.textContent = new Date().toISOString().slice(0, 10);
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
renderNav();
|
||||
loadReleaseInfo();
|
||||
if (window.lucide) lucide.createIcons();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user