From d884bd539b25b2d18e90d607cc4b40518f7f9e8b Mon Sep 17 00:00:00 2001 From: coolcoala Date: Fri, 18 Jul 2025 04:30:43 +0300 Subject: [PATCH] fixed release body and configs for webview --- .github/workflows/release.yml | 91 +++++++++++++++++++++++++++-- scripts/portable-fixed-webview2.mjs | 4 +- src-tauri/webview2.arm64.json | 2 +- src-tauri/webview2.x64.json | 2 +- src-tauri/webview2.x86.json | 2 +- 5 files changed, 90 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6a721ae..6bfa2d07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,7 +106,6 @@ jobs: with: tagName: v__VERSION__ releaseName: "Clash Verge Rev Lite v__VERSION__" - releaseBody: "More new features are now supported." tauriScript: pnpm args: --target ${{ matrix.target }} @@ -219,14 +218,13 @@ jobs: sudo apt-get update sudo apt-get install jq echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV - echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV + echo "BUILDTIME=$(TZ=Europe/Moscow date)" >> $GITHUB_ENV - name: Upload Release uses: softprops/action-gh-release@v2 with: tag_name: v${{env.VERSION}} name: "Clash Verge Rev Lite v${{env.VERSION}}" - body: "More new features are now supported." token: ${{ secrets.GITHUB_TOKEN }} files: | src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb @@ -275,8 +273,8 @@ jobs: - name: Download WebView2 Runtime run: | - invoke-webrequest -uri https://github.com/westinyang/WebView2RuntimeArchive/releases/download/109.0.1518.78/Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -outfile Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab - Expand .\Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -F:* ./src-tauri + invoke-webrequest -uri https://github.com/westinyang/WebView2RuntimeArchive/releases/download/133.0.3065.92/Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.${{ matrix.arch }}.cab -outfile Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.${{ matrix.arch }}.cab + Expand .\Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.${{ matrix.arch }}.cab -F:* ./src-tauri Remove-Item .\src-tauri\tauri.windows.conf.json Rename-Item .\src-tauri\webview2.${{ matrix.arch }}.json tauri.windows.conf.json @@ -317,7 +315,6 @@ jobs: with: tag_name: v${{steps.build.outputs.appVersion}} name: "Clash Verge Rev Lite v${{steps.build.outputs.appVersion}}" - body: "More new features are now supported." token: ${{ secrets.GITHUB_TOKEN }} files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup* @@ -376,3 +373,85 @@ jobs: run: pnpm updater-fixed-webview2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + create_release_notes: + name: Create Release Notes + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Fetch UPDATE logs + id: fetch_update_logs + run: | + if [ -f "UPDATELOG.md" ]; then + UPDATE_LOGS=$(awk '/^## v/{if(flag) exit; flag=1} flag' UPDATELOG.md) + if [ -n "$UPDATE_LOGS" ]; then + echo "Found update logs" + echo "UPDATE_LOGS<> $GITHUB_ENV + echo "$UPDATE_LOGS" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + else + echo "No update sections found in UPDATELOG.md" + fi + else + echo "UPDATELOG.md file not found" + fi + shell: bash + + - name: Get Version + run: | + sudo apt-get update + sudo apt-get install jq + echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV + echo "BUILDTIME=$(TZ=Europe/Moscow date)" >> $GITHUB_ENV + + - run: | + if [ -z "$UPDATE_LOGS" ]; then + echo "No update logs found, using default message" + UPDATE_LOGS="More new features are now supported. Check for detailed changelog soon." + else + echo "Using found update logs" + fi + + cat > release.txt << EOF + $UPDATE_LOGS + + ## Which version should I download? + + ### macOS +
+
+ > :warning: **Warning** + If you get a notification that the application is corrupted when you run it on macOS, run this command:
+ `sudo xattr -r -c /Applications/Clash\ Verge\ Rev\ Lite.app` + + ### Linux +
+ + +
+ + +
+ + + ### Windows (Win7 is no longer supported) + #### Normal version (recommended) +
+ + #### Portable version is no longer available with many problems + #### Built-in Webview version 2 (large size, only used in enterprise version of the system or can not install webview2) +
+ + + Created at ${{ env.BUILDTIME }}. + EOF + + - name: Upload Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{env.VERSION}} + name: "Clash Verge Rev Lite v${{env.VERSION}}" + body_path: release.txt + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/portable-fixed-webview2.mjs b/scripts/portable-fixed-webview2.mjs index b3424fb5..93526eb8 100644 --- a/scripts/portable-fixed-webview2.mjs +++ b/scripts/portable-fixed-webview2.mjs @@ -49,9 +49,9 @@ async function resolvePortable() { zip.addLocalFolder( path.join( releaseDir, - `Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${arch}`, + `Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.${arch}`, ), - `Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${arch}`, + `Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.${arch}`, ); zip.addLocalFolder(configDir, ".config"); diff --git a/src-tauri/webview2.arm64.json b/src-tauri/webview2.arm64.json index 42087083..eff1286c 100644 --- a/src-tauri/webview2.arm64.json +++ b/src-tauri/webview2.arm64.json @@ -9,7 +9,7 @@ "timestampUrl": "", "webviewInstallMode": { "type": "fixedRuntime", - "path": "./Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.arm64/" + "path": "./Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.arm64/" }, "nsis": { "displayLanguageSelector": true, diff --git a/src-tauri/webview2.x64.json b/src-tauri/webview2.x64.json index 39575d2c..96a40f5a 100644 --- a/src-tauri/webview2.x64.json +++ b/src-tauri/webview2.x64.json @@ -9,7 +9,7 @@ "timestampUrl": "", "webviewInstallMode": { "type": "fixedRuntime", - "path": "./Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.x64/" + "path": "./Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.x64/" }, "nsis": { "displayLanguageSelector": true, diff --git a/src-tauri/webview2.x86.json b/src-tauri/webview2.x86.json index 523dd12b..1fc30946 100644 --- a/src-tauri/webview2.x86.json +++ b/src-tauri/webview2.x86.json @@ -9,7 +9,7 @@ "timestampUrl": "", "webviewInstallMode": { "type": "fixedRuntime", - "path": "./Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.x86/" + "path": "./Microsoft.WebView2.FixedVersionRuntime.133.0.3065.92.x86/" }, "nsis": { "displayLanguageSelector": true,