CI 修改
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 7s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 13s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 14s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 22s
Build and Release / release (push) Successful in 47s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 7s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 13s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 14s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 22s
Build and Release / release (push) Successful in 47s
This commit is contained in:
@@ -134,17 +134,29 @@ jobs:
|
||||
}
|
||||
done
|
||||
|
||||
# 上传 Debian 包到 Debian Package Registry
|
||||
# 上传 Debian 包到 Debian Package Registry (支持多个发行版)
|
||||
echo ""
|
||||
echo "📦 上传 Debian 包到 Debian Package Registry..."
|
||||
for file in *.deb; do
|
||||
[ ! -f "$file" ] && continue
|
||||
echo " ⬆️ $file"
|
||||
|
||||
# 上传到 bookworm (Debian 12)
|
||||
echo " ⬆️ $file → bookworm"
|
||||
curl -fsSL -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$file" \
|
||||
"https://${REGISTRY}/api/packages/${OWNER}/debian/pool/bookworm/main/upload" || {
|
||||
echo "❌ Debian 包上传失败: $file"
|
||||
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)"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
@@ -154,7 +166,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","","```bash","# Add repository",f"echo \"deb https://{r}/api/packages/{o}/debian bookworm main\" | sudo tee /etc/apt/sources.list.d/xxxigcc-proxy.list","","# Update and install","sudo apt-get update","sudo apt-get install xxxigcc-proxy","```"];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","","**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","sudo apt-get install xxxigcc-proxy","```","","**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","sudo apt-get install xxxigcc-proxy","```"];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