Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gopi2401 committed Oct 6, 2024
1 parent 1d7a343 commit e6cb998
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
with:
java-version: "17"
distribution: "adopt" # You can keep 'temurin' if needed
cache: "gradle"

# Gradle cache for faster builds
- uses: actions/cache@v4
Expand All @@ -31,24 +32,15 @@ jobs:
${{ runner.os }}-gradle-
${{ runner.os }}-
- uses: actions/cache@v4
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}

# Setup Flutter environment
- uses: subosito/flutter-action@v2
with:
channel: "stable"

# Flutter cache for faster builds (uncomment if needed)
# - uses: actions/cache@v4
# with:
# path: |
# ${{ env.FLUTTER_ROOT }}/bin/cache
# key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.yaml') }}
# restore-keys: |
# ${{ runner.os }}-flutter-
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"

# Get Flutter dependencies
- run: flutter pub get
Expand All @@ -60,6 +52,11 @@ jobs:
GITHUBTOKEN=${{ secrets.GITHUBTOKEN }}
EOF
- uses: actions/cache@v4
with:
path: /usr/local/lib/android/sdk
key: ${{ runner.os }}-android-sdk

# Build APK with additional flags for optimization
- run: flutter build apk --release

Expand Down

0 comments on commit e6cb998

Please sign in to comment.