Merge pull request #21 from Resolum/develop #3
Workflow file for this run
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: Intiva Firebase App Distribution | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - 'release/**' | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| jobs: | |
| distribute: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Create google-services.json | |
| env: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| run: | | |
| echo "$GOOGLE_SERVICES_JSON" > app/google-services.json | |
| - name: Create Firebase service account file | |
| env: | |
| FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }} | |
| run: | | |
| echo "$FIREBASE_SERVICE_ACCOUNT_KEY" > firebase-service-account.json | |
| - name: Set Firebase credentials | |
| run: | | |
| echo "GOOGLE_APPLICATION_CREDENTIALS=$PWD/firebase-service-account.json" >> $GITHUB_ENV | |
| - name: Grant execute permission to gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build release APK | |
| run: ./gradlew assembleRelease | |
| - name: Upload release to Firebase App Distribution | |
| run: ./gradlew appDistributionUploadRelease |