Skip to content

Commit

Permalink
[#360] Update config files and README to guide distribute app by usin…
Browse files Browse the repository at this point in the history
…g Service Account
  • Loading branch information
hoangnguyen92dn committed Jun 5, 2023
1 parent 0c7eb6f commit 6309094
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cicdtemplate/.github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The `.github` contains all the required setup for Github Action to trigger. Simp
Here are the current Secrets we need to add to the Project Settings - Secret:

- `FIREBASE_APP_ID_STAGING` - your application id on Firebase.
- `FIREBASE_TOKEN` - your Firebase access/refresh token. Follow this [Guideline](https://firebase.google.com/docs/cli#cli-ci-systems) to get one for your project.
- `FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT` - your Firebase service account credential file. Follow this [Guideline](https://github.com/wzieba/Firebase-Distribution-Github-Action/wiki/FIREBASE_TOKEN-migration#guide-2---the-same-but-with-screenshots) to get one for your project.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID_STAGING}}
token: ${{secrets.FIREBASE_TOKEN}}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/apk/staging/debug/app-staging-debug.apk

Expand All @@ -74,6 +74,6 @@ jobs:
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID_PRODUCTION}}
token: ${{secrets.FIREBASE_TOKEN}}
serviceCredentialsFileContent: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/apk/production/debug/app-production-debug.apk
8 changes: 4 additions & 4 deletions RxJavaTemplate[DEPRECATED]/fastlane/script/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def sanity_check
errors = []
errors << verify_slack_config unless verify_slack_config.nil?
errors << verify_workspace_config unless verify_workspace_config.nil?
errors << verify_firebase_token unless verify_firebase_token.nil?
errors << verify_service_account unless verify_service_account.nil?
throw errors unless errors.empty?
end

Expand All @@ -55,9 +55,9 @@ def verify_workspace_config
'Missing env.WORKSPACE, please set it accordingly and retry'
end

def verify_firebase_token
return unless ENV['FIREBASE_TOKEN'].nil?
def verify_service_account
return unless ENV['FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT'].nil?

'Missing env.FIREBASE_TOKEN for Firebase, please set it accordingly and retry'
'Missing env.FIREBASE_SERVICE_ACCOUNT_CREDENTIAL_FILE_CONTENT for Firebase App Distribution, please set it accordingly and retry'
end
end

0 comments on commit 6309094

Please sign in to comment.