feat: Tag管理功能 + 打包脚本优化 + CI/CD发布流水线

- 新增标签管理: 列表/创建/删除/推送标签 (后端API + 前端UI)
- 前端新增标签Tab页,支持创建、删除、推送操作
- config.go 改为从可执行文件同目录加载 config.yaml
- 各平台构建脚本自动复制 config.yaml 到输出目录
- Windows 打包改为 ZIP 格式 (不依赖 NSIS)
- 新增 GitHub Actions Release 工作流 (三平台自动构建+发布)
This commit is contained in:
zyj
2026-03-09 17:18:53 +08:00
parent 29f1c0514a
commit 1b20fc2c51
14 changed files with 778 additions and 10 deletions

View File

@@ -129,6 +129,32 @@ func (g *GitClient) RevertCommit(path, hash string) (string, error) {
return g.Run(path, "revert", "--no-edit", hash)
}
// TagList 获取所有标签(按版本号降序,带创建时间和提交哈希)
func (g *GitClient) TagList(path string) (string, error) {
return g.Run(path, "tag", "-l", "--sort=-version:refname",
"--format=%(refname:short)\t%(objectname:short)\t%(creatordate:unix)\t%(*objectname:short)\t%(contents:subject)")
}
// CreateTag 创建注释标签
func (g *GitClient) CreateTag(path, name, message string) (string, error) {
return g.Run(path, "tag", "-a", name, "-m", message)
}
// DeleteTag 删除本地标签
func (g *GitClient) DeleteTag(path, name string) (string, error) {
return g.Run(path, "tag", "-d", name)
}
// PushTag 推送标签到远程
func (g *GitClient) PushTag(path, name string) (string, error) {
return g.Run(path, "push", "origin", name)
}
// DeleteRemoteTag 删除远程标签
func (g *GitClient) DeleteRemoteTag(path, name string) (string, error) {
return g.Run(path, "push", "origin", "--delete", name)
}
// BranchList 获取所有本地分支
func (g *GitClient) BranchList(path string) (string, error) {
return g.Run(path, "branch", "--format=%(refname:short)\t%(HEAD)")