Skip to content

Commit

Permalink
fix(firebase): inject service file for older OS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
JagandeepBrar committed Oct 26, 2022
1 parent 7d437d5 commit 38f2eb4
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 24 deletions.
21 changes: 17 additions & 4 deletions .github/actions/prepare_for_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ inputs:
required: true

# Config
firebase-options:
description: 'Firebase Options'
firebase-token:
description: 'Firebase Token'
required: false
default: ''
skip-core:
Expand Down Expand Up @@ -118,9 +118,22 @@ runs:
echo ${{ inputs.android-key-properties }} | base64 --decode > android/key.properties
- name: Setup Firebase Configuration
if: ${{ inputs.firebase-options != '' }}
if: ${{ inputs.firebase-token != '' }}
shell: bash
run: echo ${{ inputs.firebase-options }} | base64 --decode > lib/firebase/options.dart
run: |
npm install -g firebase-tools
gem install --user-install xcodeproj
dart pub global activate flutterfire_cli
flutterfire configure \
--project=comettools-lunasea \
--token=${{ inputs.firebase-token }} \
--platforms=android,ios,macos,web \
--android-package-name=app.lunasea.lunasea \
--ios-bundle-id=app.lunasea.lunasea \
--macos-bundle-id=app.lunasea.lunasea \
--out=lib/firebase/options.dart \
--yes
- name: Setup Firebase Service Worker
if: ${{ inputs.firebase-service-worker != '' }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
flavor: ${{ inputs.flavor }}
secrets:
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

build-android:
Expand All @@ -34,7 +34,7 @@ jobs:
with:
build-number: ${{ needs.prepare.outputs.build-number }}
secrets:
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}

Expand All @@ -48,7 +48,7 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ITC_TEAM_ID: ${{ secrets.APPLE_ITC_TEAM_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
IOS_CODESIGNING_IDENTITY: ${{ secrets.IOS_CODESIGNING_IDENTITY }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
Expand All @@ -74,7 +74,7 @@ jobs:
APPLE_STORE_CONNECT_KEY: ${{ secrets.APPLE_STORE_CONNECT_KEY }}
APPLE_STORE_CONNECT_KEY_ID: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
MACOS_INSTALLER_CERT_APP_STORE: ${{ secrets.MACOS_INSTALLER_CERT_APP_STORE }}
MACOS_INSTALLER_CERT_DIRECT: ${{ secrets.MACOS_INSTALLER_CERT_DIRECT }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
Expand All @@ -90,8 +90,8 @@ jobs:
build-flavor: ${{ needs.prepare.outputs.build-flavor }}
build-title: ${{ needs.prepare.outputs.build-title }}
secrets:
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
FIREBASE_SERVICE_WORKER: ${{ secrets.FIREBASE_SERVICE_WORKER }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

build-windows:
name: Build Windows
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
type: string

secrets:
FIREBASE_OPTIONS:
FIREBASE_TOKEN:
required: true
KEY_JKS:
required: true
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: android
android-key-jks: ${{ secrets.KEY_JKS }}
android-key-properties: ${{ secrets.KEY_PROPERTIES }}
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: android
android-key-jks: ${{ secrets.KEY_JKS }}
android-key-properties: ${{ secrets.KEY_PROPERTIES }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
required: true
APPLE_TEAM_ID:
required: true
FIREBASE_OPTIONS:
FIREBASE_TOKEN:
required: true
IOS_CODESIGNING_IDENTITY:
required: true
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: ios
match-ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
required: true
APPLE_TEAM_ID:
required: true
FIREBASE_OPTIONS:
FIREBASE_TOKEN:
required: true
MACOS_INSTALLER_CERT_APP_STORE:
required: true
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: macos
appstore-connect-key: ${{ secrets.APPLE_STORE_CONNECT_KEY }}
match-ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: macos
appstore-connect-key: ${{ secrets.APPLE_STORE_CONNECT_KEY }}
match-ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: macos
appstore-connect-key: ${{ secrets.APPLE_STORE_CONNECT_KEY }}
match-ssh-private-key: ${{ secrets.MATCH_SSH_PRIVATE_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
type: string

secrets:
FIREBASE_OPTIONS:
FIREBASE_TOKEN:
required: true
FIREBASE_SERVICE_WORKER:
required: true
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
firebase-service-worker: ${{ secrets.FIREBASE_SERVICE_WORKER }}
platform: web

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
value: ${{ jobs.build-details.outputs.build-version }}

secrets:
FIREBASE_OPTIONS:
FIREBASE_TOKEN:
required: true
SENTRY_DSN:
required: true
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: test
skip-core: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Validate
on:
workflow_call:
secrets:
FIREBASE_OPTIONS:
FIREBASE_TOKEN:
required: true

jobs:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: test

- name: Analyze Release
Expand Down

0 comments on commit 38f2eb4

Please sign in to comment.