Merge pull request #80 from OurMenu/develop #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & upload to Firebase App Distribution | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| cd-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Prepare keystore dir | |
| run: mkdir -p keystore | |
| - name: Decode And Save Keystore Base64 | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore/keystore.jks | |
| - name: Decode And Save Debug Keystore Base64 | |
| run: | | |
| echo "${{ secrets.DEBUG_KEYSTORE_BASE64 }}" | base64 -d > debug.keystore | |
| - name: Generate local.properties | |
| run: | | |
| echo '${{ secrets.LOCAL_PROPERTIES }}' >> ./local.properties | |
| - name: Generate google-services.json | |
| run: | | |
| echo '${{ secrets.GOOGLE_SERVICES }}' >> ./app/google-services.json | |
| - name: Build debug APK | |
| run: ./gradlew assembleDebug | |
| - name: Upload artifact to Firebase App Distribution | |
| uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
| with: | |
| appId: ${{ secrets.FIREBASE_APP_ID }} | |
| serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | |
| groups: testers | |
| file: app/build/outputs/apk/debug/app-debug.apk | |
| # releaseNotes: ${{ steps.firebase_release_note.outputs.notes }} |