Firebase CD #15
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: Firebase CD | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| releaseNotes: | |
| description: 'Release Notes' | |
| required: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Gradle cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Decode and save Keystore | |
| run: | | |
| echo "${{ secrets.JKS_BASE64 }}" > keystore.b64 | |
| base64 -d -i keystore.b64 > keystore.jks | |
| - name: Add local.properties | |
| run: | | |
| echo '${{ secrets.LOCAL_PROPERTIES }}' > ./local.properties | |
| echo '${{ secrets.RELEASE_PROPERTIES }}' >> ./local.properties | |
| echo "storePath=keystore.jks" >> ./local.properties | |
| - name: Access Google-Service file | |
| run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json | |
| - name: Build with Gradle | |
| run: ./gradlew assembleRelease | |
| - 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: Acon | |
| releaseNotes: ${{ github.event.inputs.releaseNotes }} | |
| file: app/build/outputs/apk/release/app-release.apk |