From a9464ff7763f3de50664d6b1db6f87ca0902a6aa Mon Sep 17 00:00:00 2001 From: wonfen Date: Fri, 22 Aug 2025 16:30:07 +0800 Subject: [PATCH] chore: update release log & fix workflow2 --- .github/workflows/release.yml | 45 +++++++++++++++++++++++++---------- UPDATELOG.md | 10 ++++---- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 6 files changed, 40 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 793adea8..25228b43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,10 +5,6 @@ on: # ! 不再使用 workflow_dispatch 触发。 # workflow_dispatch: push: - # 应当限制在 main 分支上触发发布。 - branches: - - main - # 应当限制 v*.*.* 的 tag 触发发布。 tags: - "v*.*.*" permissions: write-all @@ -27,6 +23,24 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check if tag is from main branch + run: | + TAG_REF="${GITHUB_REF##*/}" + echo "Checking if tag $TAG_REF is from main branch..." + + TAG_COMMIT=$(git rev-list -n 1 $TAG_REF) + MAIN_COMMITS=$(git rev-list origin/main) + + if echo "$MAIN_COMMITS" | grep -q "$TAG_COMMIT"; then + echo "✅ Tag $TAG_REF is from main branch" + else + echo "❌ Tag $TAG_REF is not from main branch" + echo "This release workflow only accepts tags from main branch." + exit 1 + fi - name: Check tag and package.json version run: | @@ -50,7 +64,7 @@ jobs: update_tag: name: Update tag runs-on: ubuntu-latest - needs: check_tag_version + needs: [release, release-for-linux-arm, release-for-fixed-webview2] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -133,7 +147,7 @@ jobs: release: name: Release Build - needs: [check_tag_version, update_tag] + needs: [check_tag_version] strategy: fail-fast: false matrix: @@ -201,15 +215,20 @@ jobs: APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} with: - tagName: v__VERSION__ - releaseName: "Clash Verge Rev v__VERSION__" - releaseBody: "See release notes for detailed changelog." + tagName: ${{ github.ref_name }} + releaseName: "Clash Verge Rev ${{ github.ref_name }}" + releaseBody: "Draft release, will be updated later." + releaseDraft: true + prerelease: false tauriScript: pnpm args: --target ${{ matrix.target }} + includeUpdaterJson: true + + release-for-linux-arm: name: Release Build for Linux ARM - needs: [check_tag_version, update_tag] + needs: [check_tag_version] strategy: fail-fast: false matrix: @@ -332,7 +351,7 @@ jobs: release-for-fixed-webview2: name: Release Build for Fixed WebView2 - needs: [check_tag_version, update_tag] + needs: [check_tag_version] strategy: fail-fast: false matrix: @@ -479,7 +498,7 @@ jobs: submit-to-winget: name: Submit to Winget runs-on: ubuntu-latest - needs: [release-update] + needs: [update_tag, release-update] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -502,7 +521,7 @@ jobs: notify-telegram: name: Notify Telegram runs-on: ubuntu-latest - needs: [update_tag, release-update] + needs: [update_tag, release-update, release-update-for-fixed-webview2, submit-to-winget] steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/UPDATELOG.md b/UPDATELOG.md index cc8e2759..1e4dacbc 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -1,11 +1,8 @@ -## v2.4.1 - -### 🚀 性能优化 - -- 优化异步程序性能 - ## v2.4.0 +**发行代号:融** +代号释义: 「融」象征融合与贯通,寓意新版本通过全新 IPC 通信机制 将系统各部分紧密衔接,打破壁垒,实现更高效的 数据流通与全面性能优化。 + ### 🏆 重大改进 - **核心通信架构升级**:采用全新通信机制,提升应用性能和稳定性 @@ -28,6 +25,7 @@ - 改进流量图表渲染性能 - 优化配置和节点刷新策略,从5秒延长到60秒 - 改进数据缓存机制,减少重复请求 +- 优化异步程序性能 ### 🐞 修复问题 diff --git a/package.json b/package.json index 6145dc17..7af821e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clash-verge", - "version": "2.4.1", + "version": "2.4.0", "license": "GPL-3.0-only", "scripts": { "dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 93db7783..915adac1 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1093,7 +1093,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clash-verge" -version = "2.4.1" +version = "2.4.0" dependencies = [ "aes-gcm", "anyhow", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index f5000600..5b385104 100755 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clash-verge" -version = "2.4.1" +version = "2.4.0" description = "clash verge" authors = ["zzzgydi", "Tunglies", "wonfen", "MystiPanda"] license = "GPL-3.0-only" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 19e3f5f3..f382c739 100755 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,5 +1,5 @@ { - "version": "2.4.1", + "version": "2.4.0", "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "bundle": { "active": true,