From 67e7cea0092349ac40af965ef4eb9c4be4963344 Mon Sep 17 00:00:00 2001 From: gopi2401 Date: Sun, 6 Oct 2024 12:11:28 +0530 Subject: [PATCH] update: build flutter cache --- .github/workflows/build.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0b6841..8b5514f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,15 +35,21 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: "stable" + cache: true + # optional parameters follow + 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 # Flutter cache for faster builds - - uses: actions/cache@v4 - with: - path: | - ${{ env.FLUTTER_ROOT }}/bin/cache - key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }} - restore-keys: | - ${{ runner.os }}-flutter- + # - uses: actions/cache@v4 + # with: + # path: | + # ${{ env.FLUTTER_ROOT }}/bin/cache + # key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }} + # restore-keys: | + # ${{ runner.os }}-flutter- # Get Flutter dependencies - run: flutter pub get @@ -63,4 +69,4 @@ jobs: curl -s -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \ -F chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \ -F document=@build/app/outputs/flutter-apk/app-release.apk # adjust the path if needed - + -F caption=app