From ae81b37c1d62b27ae8503f74e8fb3aaff8ec314a Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Sat, 8 Jun 2024 19:36:58 +0800 Subject: [PATCH] build: remove appimage --- .github/build-for-linux/build.sh | 7 ++----- .github/workflows/alpha.yml | 11 ----------- .github/workflows/release.yml | 17 ----------------- scripts/updater-fixed-webview2.mjs | 3 +++ scripts/updater.mjs | 27 ++++++++++++--------------- src-tauri/tauri.linux.conf.json | 2 +- 6 files changed, 18 insertions(+), 49 deletions(-) diff --git a/.github/build-for-linux/build.sh b/.github/build-for-linux/build.sh index 0a7a4bc..7c2411b 100644 --- a/.github/build-for-linux/build.sh +++ b/.github/build-for-linux/build.sh @@ -1,8 +1,5 @@ pnpm install pnpm check $INPUT_TARGET sed -i "s/#openssl/openssl={version=\"0.10\",features=[\"vendored\"]}/g" src-tauri/Cargo.toml -if [ "$INPUT_TARGET" = "x86_64-unknown-linux-gnu" ]; then - cargo tauri build --target $INPUT_TARGET -else - cargo tauri build --target $INPUT_TARGET -b deb,rpm -fi + +cargo tauri build --target $INPUT_TARGET diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 8568ffb..c321980 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -118,17 +118,6 @@ jobs: echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV - - name: Upload Release - if: startsWith(matrix.target, 'x86_64') - uses: softprops/action-gh-release@v2 - with: - tag_name: alpha - name: "Clash Verge Rev Alpha" - body: "More new features are now supported." - prerelease: true - token: ${{ secrets.GITHUB_TOKEN }} - files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage* - - name: Upload Release uses: softprops/action-gh-release@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63ed86d..340fbfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,13 +103,6 @@ jobs: NODE_OPTIONS: "--max_old_space_size=4096" TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} - APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} - #加入以下内容为提交app到apple认证,当前会报错,已发邮件与apple沟通 - #APPLE_ID: ${{ secrets.APPLE_ID }} - #APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} - #APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} with: target: ${{ matrix.target }} @@ -119,16 +112,6 @@ jobs: sudo apt-get install jq echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV - - name: Upload Release - if: startsWith(matrix.target, 'x86_64') - uses: softprops/action-gh-release@v2 - with: - tag_name: v${{env.VERSION}} - name: "Clash Verge Rev v${{env.VERSION}}" - body: "More new features are now supported." - token: ${{ secrets.GITHUB_TOKEN }} - files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage* - - name: Upload Release uses: softprops/action-gh-release@v2 with: diff --git a/scripts/updater-fixed-webview2.mjs b/scripts/updater-fixed-webview2.mjs index fdc3ac9..0ae0034 100644 --- a/scripts/updater-fixed-webview2.mjs +++ b/scripts/updater-fixed-webview2.mjs @@ -41,6 +41,7 @@ async function resolveUpdater() { "windows-x86_64": { signature: "", url: "" }, "windows-aarch64": { signature: "", url: "" }, "windows-x86": { signature: "", url: "" }, + "windows-i686": { signature: "", url: "" }, }, }; @@ -60,11 +61,13 @@ async function resolveUpdater() { // win32 url if (name.endsWith("x86_fixed_webview2-setup.nsis.zip")) { updateData.platforms["windows-x86"].url = browser_download_url; + updateData.platforms["windows-i686"].url = browser_download_url; } // win32 signature if (name.endsWith("x86_fixed_webview2-setup.nsis.zip.sig")) { const sig = await getSignature(browser_download_url); updateData.platforms["windows-x86"].signature = sig; + updateData.platforms["windows-i686"].signature = sig; } // win arm url diff --git a/scripts/updater.mjs b/scripts/updater.mjs index 4c1936b..34be835 100644 --- a/scripts/updater.mjs +++ b/scripts/updater.mjs @@ -46,11 +46,13 @@ async function resolveUpdater() { "darwin-x86_64": { signature: "", url: "" }, "linux-x86_64": { signature: "", url: "" }, "linux-x86": { signature: "", url: "" }, + "linux-i686": { signature: "", url: "" }, "linux-aarch64": { signature: "", url: "" }, "linux-armv7": { signature: "", url: "" }, "windows-x86_64": { signature: "", url: "" }, "windows-aarch64": { signature: "", url: "" }, "windows-x86": { signature: "", url: "" }, + "windows-i686": { signature: "", url: "" }, }, }; @@ -72,11 +74,13 @@ async function resolveUpdater() { // win32 url if (name.endsWith("x64-setup.nsis.zip")) { updateData.platforms["windows-x86"].url = browser_download_url; + updateData.platforms["windows-i686"].url = browser_download_url; } // win32 signature if (name.endsWith("x64-setup.nsis.zip.sig")) { const sig = await getSignature(browser_download_url); updateData.platforms["windows-x86"].signature = sig; + updateData.platforms["windows-i686"].signature = sig; } // win arm url @@ -106,29 +110,22 @@ async function resolveUpdater() { // darwin url (aarch) if (name.endsWith("aarch64.app.tar.gz")) { updateData.platforms["darwin-aarch64"].url = browser_download_url; + // 使linux可以检查更新 + updateData.platforms.linux.url = browser_download_url; + updateData.platforms["linux-x86_64"].url = browser_download_url; + updateData.platforms["linux-x86"].url = browser_download_url; + updateData.platforms["linux-i686"].url = browser_download_url; + updateData.platforms["linux-aarch64"].url = browser_download_url; + updateData.platforms["linux-armv7"].url = browser_download_url; } // darwin signature (aarch) if (name.endsWith("aarch64.app.tar.gz.sig")) { const sig = await getSignature(browser_download_url); updateData.platforms["darwin-aarch64"].signature = sig; - } - - // linux x64 url - if (name.endsWith("amd64.AppImage.tar.gz")) { - updateData.platforms.linux.url = browser_download_url; - updateData.platforms["linux-x86_64"].url = browser_download_url; - updateData.platforms["linux-x86"].url = browser_download_url; - // 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage - updateData.platforms["linux-aarch64"].url = browser_download_url; - updateData.platforms["linux-armv7"].url = browser_download_url; - } - // linux x64 signature - if (name.endsWith("amd64.AppImage.tar.gz.sig")) { - const sig = await getSignature(browser_download_url); updateData.platforms.linux.signature = sig; updateData.platforms["linux-x86_64"].signature = sig; updateData.platforms["linux-x86"].url = browser_download_url; - // 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage + updateData.platforms["linux-i686"].url = browser_download_url; updateData.platforms["linux-aarch64"].signature = sig; updateData.platforms["linux-armv7"].signature = sig; } diff --git a/src-tauri/tauri.linux.conf.json b/src-tauri/tauri.linux.conf.json index 6300207..cbf131f 100644 --- a/src-tauri/tauri.linux.conf.json +++ b/src-tauri/tauri.linux.conf.json @@ -6,7 +6,7 @@ }, "bundle": { "identifier": "io.github.clash-verge-rev.clash-verge-rev", - "targets": ["deb", "rpm", "appimage", "updater"], + "targets": ["deb", "rpm"], "deb": { "depends": ["openssl"], "desktopTemplate": "./template/clash-verge.desktop",