diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 683171e50..97005e02c 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -157,15 +157,12 @@ jobs: toolchain: '1.99.1' targets: ${{ matrix.target }} - - name: Add Rust Target - run: rustup target add ${{ matrix.target }} - - name: Rust Cache uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' workspaces: | . -> target cache-all-crates: true @@ -188,14 +185,6 @@ jobs: node-version: '26.13.0' cache: 'pnpm' - - name: Pnpm Cache - uses: actions/cache@v6 - with: - path: ~/.pnpm-store - key: 'pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}' - restore-keys: | - pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - - name: Pnpm install and check run: | pnpm i @@ -204,12 +193,6 @@ jobs: - name: Release ${{ env.TAG_CHANNEL }} Version run: pnpm release-version autobuild-latest - - name: Add Rust Target - run: | - rustup target add ${{ matrix.target }} --toolchain 1.99.1 || rustup target add ${{ matrix.target }} - rustup target list --installed - echo "Rust target ${{ matrix.target }} installed." - - name: Tauri build for Windows-macOS-Linux uses: tauri-apps/tauri-action@v1 env: @@ -260,15 +243,12 @@ jobs: toolchain: '1.99.1' targets: ${{ matrix.target }} - - name: Add Rust Target - run: rustup target add ${{ matrix.target }} - - name: Rust Cache uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' workspaces: | . -> target cache-all-crates: true @@ -285,14 +265,6 @@ jobs: node-version: '26.13.0' cache: 'pnpm' - - name: Pnpm Cache - uses: actions/cache@v6 - with: - path: ~/.pnpm-store - key: 'pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}' - restore-keys: | - pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - - name: Pnpm install and check run: | pnpm i @@ -345,12 +317,6 @@ jobs: gcc-arm-linux-gnueabihf \ g++-arm-linux-gnueabihf - - name: Add Rust Target - run: | - rustup target add ${{ matrix.target }} --toolchain 1.99.1 || rustup target add ${{ matrix.target }} - rustup target list --installed - echo "Rust target ${{ matrix.target }} installed." - - name: Tauri Build for Linux run: | export PKG_CONFIG_ALLOW_CROSS=1 @@ -404,15 +370,18 @@ jobs: - name: Checkout Repository uses: actions/checkout@v7 - - name: Add Rust Target - run: rustup target add ${{ matrix.target }} + - name: Install Rust Stable + uses: dtolnay/rust-toolchain@master + with: + toolchain: '1.99.1' + targets: ${{ matrix.target }} - name: Rust Cache uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}-fixed-webview2' workspaces: | . -> target cache-all-crates: true @@ -429,14 +398,6 @@ jobs: node-version: '26.13.0' cache: 'pnpm' - - name: Pnpm Cache - uses: actions/cache@v6 - with: - path: ~/.pnpm-store - key: 'pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}' - restore-keys: | - pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - - name: Pnpm install and check run: | pnpm i @@ -452,12 +413,6 @@ jobs: Remove-Item .\src-tauri\tauri.windows.conf.json Rename-Item .\src-tauri\webview2.${{ matrix.arch }}.json tauri.windows.conf.json - - name: Add Rust Target - run: | - rustup target add ${{ matrix.target }} --toolchain 1.99.1 || rustup target add ${{ matrix.target }} - rustup target list --installed - echo "Rust target ${{ matrix.target }} installed." - - name: Tauri build for Windows id: build uses: tauri-apps/tauri-action@v1 diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c3256c5d4..e927ef59c 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -77,11 +77,12 @@ jobs: uses: dtolnay/rust-toolchain@1.99.1 - name: Rust Cache + if: github.event.inputs[matrix.input] == 'true' uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' workspaces: | . -> target cache-all-crates: true @@ -106,15 +107,6 @@ jobs: node-version: '26.13.0' cache: 'pnpm' - - name: Pnpm Cache - uses: actions/cache@v6 - with: - path: ~/.pnpm-store - key: 'pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}' - restore-keys: | - pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - lookup-only: true - - name: Pnpm install and check if: github.event.inputs[matrix.input] == 'true' run: | diff --git a/.github/workflows/frontend-check.yml b/.github/workflows/frontend-check.yml index 923a7e61c..c140f8260 100644 --- a/.github/workflows/frontend-check.yml +++ b/.github/workflows/frontend-check.yml @@ -39,14 +39,6 @@ jobs: node-version: '26.13.0' cache: 'pnpm' - - name: Restore pnpm cache - uses: actions/cache@v6 - with: - path: ~/.pnpm-store - key: "pnpm-shared-stable-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}" - restore-keys: | - pnpm-shared-stable-${{ runner.os }}- - - run: pnpm install --frozen-lockfile - name: Run Prettier check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 335f99087..69048f75d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -206,15 +206,12 @@ jobs: toolchain: '1.99.1' targets: ${{ matrix.target }} - - name: Add Rust Target - run: rustup target add ${{ matrix.target }} - - name: Rust Cache uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' workspaces: | . -> target cache-all-crates: true @@ -226,27 +223,22 @@ jobs: sudo apt-get update sudo apt-get install -y libxslt1.1 libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf - - name: Install Node - uses: actions/setup-node@v7 - with: - node-version: '26.13.0' - - uses: pnpm/action-setup@v6 name: Install pnpm with: run_install: false + - name: Install Node + uses: actions/setup-node@v7 + with: + node-version: '26.13.0' + cache: 'pnpm' + - name: Pnpm install and check run: | pnpm i pnpm run prebuild ${{ matrix.target }} - - name: Add Rust Target - run: | - rustup target add ${{ matrix.target }} --toolchain 1.99.1 || rustup target add ${{ matrix.target }} - rustup target list --installed - echo "Rust target ${{ matrix.target }} installed." - - name: Tauri build uses: tauri-apps/tauri-action@v1.0.0 env: @@ -319,30 +311,28 @@ jobs: toolchain: '1.99.1' targets: ${{ matrix.target }} - - name: Add Rust Target - run: rustup target add ${{ matrix.target }} - - name: Rust Cache uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' workspaces: | . -> target cache-all-crates: true cache-workspace-crates: true - - name: Install Node - uses: actions/setup-node@v7 - with: - node-version: '26.13.0' - - name: Install pnpm uses: pnpm/action-setup@v6 with: run_install: false + - name: Install Node + uses: actions/setup-node@v7 + with: + node-version: '26.13.0' + cache: 'pnpm' + - name: Pnpm install and check run: | pnpm i @@ -392,12 +382,6 @@ jobs: gcc-arm-linux-gnueabihf \ g++-arm-linux-gnueabihf - - name: Add Rust Target - run: | - rustup target add ${{ matrix.target }} --toolchain 1.99.1 || rustup target add ${{ matrix.target }} - rustup target list --installed - echo "Rust target ${{ matrix.target }} installed." - - name: Build for Linux run: | export PKG_CONFIG_ALLOW_CROSS=1 @@ -458,30 +442,28 @@ jobs: toolchain: '1.99.1' targets: ${{ matrix.target }} - - name: Add Rust Target - run: rustup target add ${{ matrix.target }} - - name: Rust Cache uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/dev' }} prefix-key: 'v1-rust' - key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}' + shared-key: 'rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}-fixed-webview2' workspaces: | . -> target cache-all-crates: true cache-workspace-crates: true - - name: Install Node - uses: actions/setup-node@v7 - with: - node-version: '26.13.0' - - uses: pnpm/action-setup@v6 name: Install pnpm with: run_install: false + - name: Install Node + uses: actions/setup-node@v7 + with: + node-version: '26.13.0' + cache: 'pnpm' + - name: Pnpm install and check run: | pnpm i @@ -494,12 +476,6 @@ jobs: Remove-Item .\src-tauri\tauri.windows.conf.json Rename-Item .\src-tauri\webview2.${{ matrix.arch }}.json tauri.windows.conf.json - - name: Add Rust Target - run: | - rustup target add ${{ matrix.target }} --toolchain 1.99.1 || rustup target add ${{ matrix.target }} - rustup target list --installed - echo "Rust target ${{ matrix.target }} installed." - - name: Tauri build uses: tauri-apps/tauri-action@v1.0.0 env: diff --git a/scripts-workflow/release.mjs b/scripts-workflow/release.mjs index 730273659..82748a0c2 100644 --- a/scripts-workflow/release.mjs +++ b/scripts-workflow/release.mjs @@ -345,6 +345,8 @@ function releaseBody(tag, sha, tags, publishing) { .join('\n\n') || 'No new commits.' return `## ${titleFor(tag)} +@clash-verge-rev/release + Source: \`dev\` ยท [${sha}](${url}/commit/${sha}) \n${comparison} ${ publishing