From 936b2131e001dc4389fec80a9ca38b7cd6da3ea7 Mon Sep 17 00:00:00 2001 From: GyDi Date: Wed, 1 Jun 2022 00:43:57 +0800 Subject: [PATCH] chore: adjust ci and script --- .github/workflows/alpha.yml | 31 ++++--------------------------- .github/workflows/ci.yml | 2 +- .github/workflows/test.yml | 2 +- scripts/check.mjs | 4 ++-- 4 files changed, 8 insertions(+), 31 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 19fa9ab..2c7813a 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -58,31 +58,9 @@ jobs: - name: Yarn install and check run: | yarn install --network-timeout 1000000 - yarn run check --meta + yarn run check - # - name: Tauri build - # uses: tauri-apps/tauri-action@v0 - # # enable cache even though failed - # continue-on-error: true - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - # TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - # with: - # tagName: alpha - # releaseName: "Clash Verge Alpha" - # releaseBody: "Alpha Version" - # releaseDraft: false - # prerelease: true - - # - name: Green zip bundle - # if: matrix.os == 'windows-latest' - # run: | - # yarn run portable - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Tauri build Meta + - name: Tauri build uses: tauri-apps/tauri-action@743a37fd53cbdd122910b818b9bef7b7aa019134 # enable cache even though failed continue-on-error: true @@ -93,15 +71,14 @@ jobs: TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} with: tagName: alpha - args: "-c src-tauri/tauri.alpha.json" releaseName: "Clash Verge Alpha" releaseBody: "Alpha Version" releaseDraft: true prerelease: true - - name: Portable Bundle For Meta + - name: Portable Bundle if: matrix.os == 'windows-latest' run: | - yarn run portable --meta + yarn run portable env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e4e392..ed2cb8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: releaseDraft: false prerelease: true - - name: Green zip bundle + - name: Portable Bundle if: matrix.os == 'windows-latest' run: | yarn run portable diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e31ca7..b3e0a71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,7 +62,7 @@ jobs: - name: Yarn install and check run: | yarn install --network-timeout 1000000 - yarn run check --meta + yarn run check - name: Tauri build uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d diff --git a/scripts/check.mjs b/scripts/check.mjs index 7041a32..3661f82 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -10,7 +10,7 @@ const cwd = process.cwd(); const TEMP_DIR = path.join(cwd, "node_modules/.verge"); const FORCE = process.argv.includes("--force"); -const META = process.argv.includes("--meta"); // use Clash.Meta +const NO_META = process.argv.includes("--no-meta") || false; /** * get the correct clash release infomation @@ -87,7 +87,7 @@ async function resolveSidecar() { const ext = process.platform === "win32" ? ".exe" : ""; await clash(); - if (META) await clashMeta(); + if (!NO_META) await clashMeta(); async function clash() { const sidecarFile = `clash-${host}${ext}`;