Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mllrr96 committed Apr 5, 2024
1 parent e3da445 commit 95b06b7
Showing 1 changed file with 41 additions and 24 deletions.
65 changes: 41 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,49 @@ jobs:
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
- name: Write secrets to files
shell: bash
run: |
echo GOOGLE_SERVICE_ANDROID | base64 -d > android/app/google-services.json
echo FIREBASE_APP_ID | base64 -d > ios/firebase_app_id_file.json
echo FIREBASE_OPTIONS | base64 -d > lib/firebase_options.dart
wc -l android/app/google-services.json
env:
GOOGLE_SERVICE_ANDROID: ${{ secrets.GOOGLE_SERVICE_ANDROID }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
- name: Write google-services file for Android
run: printf "${{ secrets.GOOGLE_SERVICE_ANDROID }}" > android/app/google-services.json
- name: Write firebase app id file for for iOS
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.FIREBASE_APP_ID }}
filename: "firebase_app_id_file.json"
is-executable: false
working-directory: "ios"
# - name: Write google-services file for Android
# uses: mobiledevops/secret-to-file-action@v1
# with:
# base64-encoded-secret: ${{ secrets.GOOGLE_SERVICE_ANDROID }}
# filename: "google-services.json"
# is-executable: false
# working-directory: "android/app"

- name: Write firebase options file
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.FIREBASE_OPTIONS }}
filename: "firebase_options.dart"
is-executable: false
working-directory: "lib"

- name: Write GoogleService-Info.plist file for iOS
uses: mobiledevops/secret-to-file-action@v1
with:
base64-encoded-secret: ${{ secrets.GOOGLE_INFO_PLIST_IOS }}
filename: "GoogleService-Info.plist"
is-executable: false
working-directory: "ios/Runner"
# - name: Write firebase app id file for for iOS
# uses: mobiledevops/secret-to-file-action@v1
# with:
# base64-encoded-secret: ${{ secrets.FIREBASE_APP_ID }}
# filename: "firebase_app_id_file.json"
# is-executable: false
# working-directory: "ios"
#
# - name: Write firebase options file
# uses: mobiledevops/secret-to-file-action@v1
# with:
# base64-encoded-secret: ${{ secrets.FIREBASE_OPTIONS }}
# filename: "firebase_options.dart"
# is-executable: false
# working-directory: "lib"
#
# - name: Write GoogleService-Info.plist file for iOS
# uses: mobiledevops/secret-to-file-action@v1
# with:
# base64-encoded-secret: ${{ secrets.GOOGLE_INFO_PLIST_IOS }}
# filename: "GoogleService-Info.plist"
# is-executable: false
# working-directory: "ios/Runner"

- name: Build APK
run: |
Expand Down

0 comments on commit 95b06b7

Please sign in to comment.