Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DJaegerScript authored Jan 18, 2024
1 parent c72ee02 commit 3a4f170
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Firebase APP workflow

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
firebase_app:
name: Run Firebase Workflow
runs-on: ubuntu-latest ## virtual machine
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'

- name: Change Directory to Flutter Project
run: cd flutter_app

- name: Decode google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo "$GOOGLE_SERVICES_JSON" > android/app/google-services.json

- run: sed -i "s/MAPS_API_KEY/${{ secrets.MAPS_API_KEY }}/g" ./android/app/src/main/AndroidManifest.xml
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build apk --dart-define=API_URL=${{ secrets.API_URL }}
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: build/app/outputs/apk/release/app-release.apk
- name: Upload to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{secrets.CREDENTIAL_FILE_CONTENT}}
groups: testers
file: build/app/outputs/flutter-apk/app.apk

0 comments on commit 3a4f170

Please sign in to comment.