From 006ba5d73ed12414fd9f0106242cf6e8c3573981 Mon Sep 17 00:00:00 2001 From: DawnMagnet Date: Sun, 3 Mar 2024 15:32:31 +0800 Subject: [PATCH] update ci cache --- .github/workflows/flutter-workflow.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/flutter-workflow.yaml b/.github/workflows/flutter-workflow.yaml index c6f7b65..f98a473 100644 --- a/.github/workflows/flutter-workflow.yaml +++ b/.github/workflows/flutter-workflow.yaml @@ -17,6 +17,11 @@ jobs: uses: subosito/flutter-action@v2 with: 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 - name: Install dependencies run: | @@ -71,6 +76,11 @@ jobs: uses: subosito/flutter-action@v2 with: 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 - name: Install dependencies run: flutter pub get @@ -96,6 +106,12 @@ jobs: - uses: subosito/flutter-action@v2 with: 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 build windows - name: Upload artifacts