Skip to content

Commit

Permalink
update: build flutter cache
Browse files Browse the repository at this point in the history
  • Loading branch information
gopi2401 committed Oct 6, 2024
1 parent 19516ba commit 67e7cea
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 67e7cea

Please sign in to comment.