git workflow updates fix - app id changed #11
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: Android CI/CD with Firebase | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| name: Build & Distribute | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for Gradle | |
| run: chmod +x gradlew | |
| - name: Decode Keystore | |
| run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > tasks.jks | |
| - name: Build Release APK | |
| run: ./gradlew assembleRelease -PMYAPP_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }} -PMYAPP_KEY_ALIAS=${{ secrets.KEY_ALIAS }} -PMYAPP_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }} | |
| - name: Check build outputs | |
| run: ls -R app/build/outputs | |
| - name: Upload to Firebase App Distribution | |
| uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
| with: | |
| appId: 1:81340412252:android:520d6fc9bd2873f2179199 | |
| serviceCredentialsFileContent: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }} | |
| groups: internal-testers | |
| file: app/build/outputs/apk/release/app-release-unsigned.apk | |
| releaseNotes: "🚀 Automated release build" | |