From 4919405948801f0098c7e1edf8baef4929b6e0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Wed, 15 Apr 2026 22:40:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20artifact=20=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=BA=A7=E5=93=81=E5=90=8D=E5=92=8C=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 格式: Claude-Code-Haha-v{version}-{platform} Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/build-desktop-dev.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-desktop-dev.yml b/.github/workflows/build-desktop-dev.yml index 9f42664c..3fa0d949 100644 --- a/.github/workflows/build-desktop-dev.yml +++ b/.github/workflows/build-desktop-dev.yml @@ -33,7 +33,7 @@ jobs: steps: - id: set-matrix run: | - ALL='[{"platform":"macos-latest","rust_target":"aarch64-apple-darwin","tauri_args":"--target aarch64-apple-darwin","bundles":"app,dmg","label":"macOS-ARM64","artifact_name":"desktop-macos-arm64"},{"platform":"macos-latest","rust_target":"x86_64-apple-darwin","tauri_args":"--target x86_64-apple-darwin","bundles":"app,dmg","label":"macOS-x64","artifact_name":"desktop-macos-x64"},{"platform":"windows-latest","rust_target":"x86_64-pc-windows-msvc","tauri_args":"","bundles":"nsis,msi","label":"Windows-x64","artifact_name":"desktop-windows-x64"},{"platform":"ubuntu-22.04","rust_target":"x86_64-unknown-linux-gnu","tauri_args":"","bundles":"deb,appimage","label":"Linux-x64","artifact_name":"desktop-linux-x64"},{"platform":"ubuntu-22.04-arm","rust_target":"aarch64-unknown-linux-gnu","tauri_args":"","bundles":"deb,appimage","label":"Linux-ARM64","artifact_name":"desktop-linux-arm64"}]' + ALL='[{"platform":"macos-latest","rust_target":"aarch64-apple-darwin","tauri_args":"--target aarch64-apple-darwin","bundles":"app,dmg","label":"macOS-ARM64","artifact_name":"macos-arm64"},{"platform":"macos-latest","rust_target":"x86_64-apple-darwin","tauri_args":"--target x86_64-apple-darwin","bundles":"app,dmg","label":"macOS-x64","artifact_name":"macos-x64"},{"platform":"windows-latest","rust_target":"x86_64-pc-windows-msvc","tauri_args":"","bundles":"nsis,msi","label":"Windows-x64","artifact_name":"windows-x64"},{"platform":"ubuntu-22.04","rust_target":"x86_64-unknown-linux-gnu","tauri_args":"","bundles":"deb,appimage","label":"Linux-x64","artifact_name":"linux-x64"},{"platform":"ubuntu-22.04-arm","rust_target":"aarch64-unknown-linux-gnu","tauri_args":"","bundles":"deb,appimage","label":"Linux-ARM64","artifact_name":"linux-arm64"}]' SELECTED="${{ inputs.platforms }}" if [ "$SELECTED" = "all" ]; then @@ -63,6 +63,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # ── 读取版本号 ─────────────────────────────────────────── + - name: Read version + id: version + shell: bash + run: | + VERSION=$(jq -r '.version' desktop/src-tauri/tauri.conf.json) + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + # ── 系统依赖 (Linux) ───────────────────────────────────── - name: Install Linux dependencies if: contains(matrix.platform, 'ubuntu') @@ -151,7 +159,7 @@ jobs: SEARCH_DIR="$FALLBACK_DIR" fi - STAGING="desktop/build-artifacts/ci-${{ matrix.artifact_name }}" + STAGING="desktop/build-artifacts/ci-Claude-Code-Haha-v${{ steps.version.outputs.version }}-${{ matrix.artifact_name }}" mkdir -p "$STAGING" echo "Searching for artifacts in: $SEARCH_DIR" @@ -175,7 +183,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: ${{ matrix.artifact_name }} + name: Claude-Code-Haha-v${{ steps.version.outputs.version }}-${{ matrix.artifact_name }} path: ${{ steps.collect.outputs.staging_dir }} retention-days: 7 if-no-files-found: warn