From 61479f3f15d7da1ca403d02c521199c912735e17 Mon Sep 17 00:00:00 2001 From: yaojin3616 Date: Sat, 15 Aug 2026 22:18:38 +0800 Subject: [PATCH] chore: add Tencent COS mirror and update build config --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ package.json | 18 ++++++++++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7079cb7..470b367 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -407,3 +407,31 @@ jobs: --title "DSH Desktop $RELEASE_TAG" \ --repo "$GITHUB_REPOSITORY" fi + - name: Mirror release assets to Tencent COS + env: + COS_SECRET_ID: ${{ secrets.COS_SECRET_ID }} + COS_SECRET_KEY: ${{ secrets.COS_SECRET_KEY }} + COS_BUCKET: ${{ vars.COS_BUCKET }} + COS_REGION: ${{ vars.COS_REGION }} + RELEASE_TAG: ${{ github.ref_name }} + run: | + set -euo pipefail + test -n "$COS_SECRET_ID" && test -n "$COS_SECRET_KEY" || { echo "::error::Missing secrets COS_SECRET_ID/COS_SECRET_KEY"; exit 1; } + test -n "$COS_BUCKET" && test -n "$COS_REGION" || { echo "::error::Missing variables COS_BUCKET/COS_REGION"; exit 1; } + curl -sSfL -o coscli https://github.com/tencentyun/coscli/releases/download/v1.0.8/coscli-v1.0.8-linux-amd64 + chmod +x coscli + cat > "$HOME/.cos.yaml" <