attempt to trigger pipeline #36
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: App Distribution | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'client/**' | |
jobs: | |
firebase_app: | |
name: Distributing App | |
runs-on: ubuntu-latest ## virtual machine | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Create Service Account | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
run: echo "$GOOGLE_SERVICES_JSON" > ./client/android/app/google-services.json | |
- name: Configure Google Maps API | |
run: sed -i "s/MAPS_API_KEY/${{ secrets.MAPS_API_KEY }}/g" ./client/android/app/src/main/AndroidManifest.xml | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Build Release App | |
run: cd client && flutter pub get && flutter build apk --dart-define=API_URL=${{ secrets.API_URL }} --dart-define=FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }} --dart-define=FIREBASE_APP_ID=${{ secrets.FIREBASE_APP_ID }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: release-apk | |
path: ./client/build/app/outputs/apk/release/app-release.apk | |
- name: Distribute App | |
uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
with: | |
appId: ${{secrets.FIREBASE_APP_ID}} | |
token: ${{secrets.FIREBASE_TOKEN}} | |
groups: jagadis-tester | |
file: ./client/build/app/outputs/flutter-apk/app-release.apk |