Skip to content

Firebase and Custom Key Signing

Hemanth Krishna edited this page Sep 17, 2020 · 2 revisions

Firebase

To use firebase in your app build, copy all the contents of google-services.json file and paste them onto a secret and pass the secret in the following input paramter of YAML file

Eg:

name: CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    name: App Brickie
    steps:
      - uses: actions/checkout@v2
      - name: AppBrickie
        id: appBrickieBuild
        uses: DarthBenro008/app-brickie@v3.0
        with:
          type: "native"
          chatid: "<YOUR CHAT ID GOES HERE>"
          packagename: "<YOUR APP NAME GOES HERE>"
          firebase: ${{ secrets.FIREBASE }}
          keystore: ${{ secrets.KEYSTORE }}
          keystorePassword: ${{ secrets.KEYSTORE_PASS }}
          keyAlias: ${{ secrets.KEY_ALIAS }}
          keyPassword: ${{ secrets.KEYSTORE_PASS }}
      - name: Get Automated Result
        run: echo "${{ steps.appBrickieBuild.outputs.result }}"

Generating secrets to enable custom key signing in the build

  • Step 1: Use the following command in *nix machines to generate a dump of your keystore file.
openssl base64 -A < <YOUR KEY NAME>.jks | tee output.txt
  • Step 2: Copy the dump from output.txt and paste it in a secret and pass it to keystore param in YAML file, this will be your first secret

  • Step 3: Create 3 other different secrets

  • Create a second secret that has the password of your keystore file
  • Create a third secret that has the name of the keyAlias
  • Create a fourth secret that has the password of your keyAlias

Pass all the secrets to the following parameters: Eg:

keystore: ${{ secrets.KEYSTORE }}
keystorePassword: ${{ secrets.KEYSTORE_PASS }}
keyAlias: ${{ secrets.KEY_ALIAS }}
keyPassword: ${{ secrets.KEYSTORE_PASS }}