Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 1.57 KB

release.md

File metadata and controls

74 lines (54 loc) · 1.57 KB

Release & Installation (CI)

本页说明如何通过 GitHub Actions 自动构建并发布 lc,以及服务器侧如何安装/升级(无需 Go)。

发版 Checklist(维护者)

  1. 更新版本号:
    • internal/cli/version.go 中 Version
    • Makefile 中 VERSION
  2. 提交并推送 main:
    git push origin main
  3. 打 tag 触发 Release Workflow:
    git tag v0.4.0
    git push origin v0.4.0
  4. 在 GitHub Actions / Releases 页确认产物:
    • lc_v0.4.0_linux_amd64.tar.gz
    • lc_v0.4.0_linux_arm64.tar.gz
    • checksums.txt
  5. 验收升级:
    lc update --check
    lc update
    lc version

Release 产物

Release Workflow 会:

  • 使用矩阵构建:linux/amd64、linux/arm64
  • 生成压缩包与 checksums.txt(sha256)

用户安装 / 升级

首次安装

curl -fsSL https://raw.githubusercontent.com/crayonxiaoxin/Linux-Cleaner/main/scripts/install.sh | bash

升级(推荐)

lc update              # 安装最新 Release
lc update --check      # 仅检查是否有新版本

非 root 且二进制在 /usr/local/bin 时,可能需要:

sudo lc update

指定版本 / 回滚

lc update --version v0.2.0

# 或用安装脚本
LC_VERSION=v0.2.0 \
  curl -fsSL https://raw.githubusercontent.com/crayonxiaoxin/Linux-Cleaner/main/scripts/install.sh | bash

版本命名约束

Release tag 必须是:

  • vMAJOR.MINOR.PATCH(例如 v0.3.0)

产物文件名依赖该格式:lc_${tag}_linux_${arch}.tar.gz。