From 959738b1729d4ccf3924b30d7fbb0dd32b9aba83 Mon Sep 17 00:00:00 2001 From: xkeyC <39891083+xkeyC@users.noreply.github.com> Date: Sun, 17 Mar 2024 18:27:37 +0800 Subject: [PATCH] fix workflow --- .github/workflows/windows_nightly.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows_nightly.yml b/.github/workflows/windows_nightly.yml index 1ea20e8..51bfb57 100644 --- a/.github/workflows/windows_nightly.yml +++ b/.github/workflows/windows_nightly.yml @@ -12,8 +12,13 @@ jobs: - name: Set up Flutter uses: subosito/flutter-action@v2 with: - channel: 'stable' - - run: flutter --version + channel: 'stable' + cache: true + cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache + cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path + pub-cache-key: 'flutter-pub:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache of dart pub get dependencies + pub-cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path + - run: flutter --version - name: Set up Rust uses: dtolnay/rust-toolchain@stable - run: rustup --version @@ -23,7 +28,10 @@ jobs: with: version: "17.0.2" - name: Clean Pub Git Cache - run: Remove-Item -Path "C:\Users\runneradmin\.pub-cache\git\*" -Recurse -Force + run: | + if (Test-Path "C:\Users\runneradmin\.pub-cache\git\") { + Remove-Item -Path "C:\Users\runneradmin\.pub-cache\git\*" -Recurse -Force + } shell: powershell - name: Flutter pub get run: flutter pub get