Update README.md #4
This file contains 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 app distribution | |
on: | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
Firebase-app-distribution: | |
name: Firebase app distribution | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 20 | |
- name: Update base url from Secrets | |
env: | |
base_url: ${{ secrets.base_url }} | |
run: echo base_url="$base_url" > ./local.properties | |
- name: Create google-services.json | |
run: cat /home/runner/work/ChatApp/ChatApp/app/google-services.json | base64 | |
- name: Put data into google-services.json | |
env: | |
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo $DATA > /home/runner/work/ChatApp/ChatApp/app/google-services.json | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build release | |
run: ./gradlew assembleRelease | |
- name: Upload artifact to Firebase App Distribution | |
uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
with: | |
appId: ${{ secrets.CHATAPP_APP_ID }} | |
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | |
groups: ${{ secrets.APP_DISTRIBUTION_GROUPS }} | |
file: app/build/outputs/apk/release/app-release-unsigned.apk |