Generate Firebase options in CICD #15
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: default-workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare runner | |
uses: ./.github/actions/prepare-ubuntu-runner | |
- name: Generate Firebase options | |
uses: ./.github/actions/generate-firebase-options | |
with: | |
firebase_service_account_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} | |
firebase_project_id: ${{ secrets.FIREBASE_PROJECT_ID }} | |
- name: Run virtual machine tests | |
run: bundle exec fastlane run_vm_tests | |
build_android: | |
name: Build Android debug | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare runner | |
uses: ./.github/actions/prepare-ubuntu-runner | |
- name: Generate Firebase options | |
uses: ./.github/actions/generate-firebase-options | |
with: | |
firebase_service_account_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} | |
firebase_project_id: ${{ secrets.FIREBASE_PROJECT_ID }} | |
- name: Build debug | |
uses: ./.github/actions/build-android | |
with: | |
type: debug | |
google_services_json: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
env_file: ${{ secrets.ENV_FILE }} | |
build_ios: | |
name: Build iOS debug | |
runs-on: macos-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare runner | |
uses: ./.github/actions/prepare-macos-runner | |
- name: Generate Firebase options | |
uses: ./.github/actions/generate-firebase-options | |
with: | |
firebase_service_account_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} | |
firebase_project_id: ${{ secrets.FIREBASE_PROJECT_ID }} | |
- name: Decode and save .env file | |
run: echo "${{ secrets.ENV_FILE }}" | base64 -d > .env | |
- name: Decode and save GoogleServices-Info.plist | |
run: echo "${{ secrets.GOOGLESERVICE_INFO_PLIST }}" | base64 -d > ./ios/Runner/GoogleService-Info.plist | |
- name: Build debug | |
run: bundle exec fastlane ios build_debug | |