Skip to content

Commit

Permalink
added support for caching generated apks
Browse files Browse the repository at this point in the history
  • Loading branch information
noumantahir committed Jan 14, 2025
1 parent 3dfb4ea commit a6ba1c0
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ jobs:
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 11479570
# - uses: actions/cache@v3
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
# restore-keys: |
# ${{ runner.os }}-gradle-
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Create Google Services JSON File
Expand All @@ -93,9 +93,14 @@ jobs:
- name: Execute Gradle build
run: |
cd android
./gradlew clean
rm -rf ~/.gradle/caches/*
./gradlew assembleRelease
- name: Cache generated APK
uses: actions/cache@v3
with:
path: app/build/outputs/apk/
key: apk-${{ runner.os }}-${{ github.sha }}
restore-keys: |
apk-${{ runner.os }}-
- name: Upload application
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit a6ba1c0

Please sign in to comment.