简化 CI 配置:统一使用 stable Debian 发行版
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -12s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -5s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 0s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 9s
Build and Release / release (push) Successful in 38s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -12s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -5s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 0s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 9s
Build and Release / release (push) Successful in 38s
- 移除多发行版 Debian Package Registry 上传(bookworm、trixie) - 统一上传到 stable 发行版池,简化维护和用户体验 - 更新 README 和文档系统的安装指南 - 新增 CI 工作流程概述文档 - 保持 ubuntu 和 alpine 双发行版构建支持
This commit is contained in:
@@ -134,29 +134,19 @@ jobs:
|
||||
}
|
||||
done
|
||||
|
||||
# 上传 Debian 包到 Debian Package Registry (支持多个发行版)
|
||||
# 上传 Debian 包到 Debian Package Registry (通用稳定版)
|
||||
echo ""
|
||||
echo "📦 上传 Debian 包到 Debian Package Registry..."
|
||||
for file in *.deb; do
|
||||
[ ! -f "$file" ] && continue
|
||||
|
||||
# 上传到 bookworm (Debian 12)
|
||||
echo " ⬆️ $file → bookworm"
|
||||
# 上传到 stable (通用稳定版)
|
||||
echo " ⬆️ $file → stable"
|
||||
curl -fsSL -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$file" \
|
||||
"https://${REGISTRY}/api/packages/${OWNER}/debian/pool/bookworm/main/upload" || {
|
||||
echo "❌ Debian 包上传失败: $file (bookworm)"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 上传到 trixie (Debian 13)
|
||||
echo " ⬆️ $file → trixie"
|
||||
curl -fsSL -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$file" \
|
||||
"https://${REGISTRY}/api/packages/${OWNER}/debian/pool/trixie/main/upload" || {
|
||||
echo "❌ Debian 包上传失败: $file (trixie)"
|
||||
"https://${REGISTRY}/api/packages/${OWNER}/debian/pool/stable/main/upload" || {
|
||||
echo "❌ Debian 包上传失败: $file (stable)"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
@@ -166,7 +156,7 @@ jobs:
|
||||
echo "📝 生成 Release..."
|
||||
|
||||
export REGISTRY OWNER TAG
|
||||
RELEASE_DATA=$(python3 -c 'import json,glob,os;r=os.environ["REGISTRY"];o=os.environ["OWNER"];p=os.environ["PRODUCT_NAME"];t=os.environ["TAG"];b=["## Release "+t,"","### 📥 下载方式","","#### 方式 1: 直接下载(推荐)","","点击下面 **Assets** 部分的文件名直接下载。","","#### 方式 2: Generic Package Registry",""]+[f"- [`{f}`](https://{r}/api/packages/{o}/generic/{p}/{t}/{f})" for f in sorted(glob.glob("*.tar.gz"))]+["","#### 方式 3: Debian Repository","","**Debian 12 (bookworm):**","","```bash","# Download GPG key",f"sudo curl https://{r}/api/packages/{o}/debian/repository.key -o /etc/apt/keyrings/gitea-{o}.asc","","# Add repository",f"echo \"deb [signed-by=/etc/apt/keyrings/gitea-{o}.asc] https://{r}/api/packages/{o}/debian bookworm main\" | sudo tee -a /etc/apt/sources.list.d/{o}.list","","# Update and install","sudo apt-get update",f"sudo apt-get install {p}","```","","**Debian 13 (trixie):**","","```bash","# Download GPG key",f"sudo curl https://{r}/api/packages/{o}/debian/repository.key -o /etc/apt/keyrings/gitea-{o}.asc","","# Add repository",f"echo \"deb [signed-by=/etc/apt/keyrings/gitea-{o}.asc] https://{r}/api/packages/{o}/debian trixie main\" | sudo tee -a /etc/apt/sources.list.d/{o}.list","","# Update and install","sudo apt-get update",f"sudo apt-get install {p}","```"];print(json.dumps({"tag_name":t,"name":f"Release {t}","body":"\n".join(b),"draft":False,"prerelease":False}))')
|
||||
RELEASE_DATA=$(python3 -c 'import json,glob,os;r=os.environ["REGISTRY"];o=os.environ["OWNER"];p=os.environ["PRODUCT_NAME"];t=os.environ["TAG"];b=["## Release "+t,"","### 📥 下载方式","","#### 方式 1: 直接下载(推荐)","","点击下面 **Assets** 部分的文件名直接下载。","","#### 方式 2: Generic Package Registry",""]+[f"- [`{f}`](https://{r}/api/packages/{o}/generic/{p}/{t}/{f})" for f in sorted(glob.glob("*.tar.gz"))]+["","#### 方式 3: Debian Repository","","```bash","# Download GPG key",f"sudo curl https://{r}/api/packages/{o}/debian/repository.key -o /etc/apt/keyrings/gitea-{o}.asc","","# Add repository",f"echo \"deb [signed-by=/etc/apt/keyrings/gitea-{o}.asc] https://{r}/api/packages/{o}/debian stable main\" | sudo tee -a /etc/apt/sources.list.d/{o}.list","","# Update and install","sudo apt-get update",f"sudo apt-get install {p}","```"];print(json.dumps({"tag_name":t,"name":f"Release {t}","body":"\n".join(b),"draft":False,"prerelease":False}))')
|
||||
|
||||
# 创建 Release
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user