-
Notifications
You must be signed in to change notification settings - Fork 84
FIREBASE_TOKEN migration
Wojciech Zięba edited this page Oct 22, 2022
·
5 revisions
Firebase CLI Tools announced depreciatiation of token authentication in favor of Service Account (source).
This means that actions configured with token parameter will stop working.
Those guides are prepared to make migration from token to Service Account as easy as possible. They both lead to the same but they differ with level of details. Choose what suits you best.
- Follow instructions described in the official documentation until reaching point 3 (create and download private JSON key).
- Create a new Secret in Github (
Settings>Secrets>Actions) with value of content of file generated in the previous point (in sample below, the name of this secret isCREDENTIAL_FILE_CONTENT). - Update configuration of Github Action:
- remove
tokenparameter - add
serviceCredentialsFileContentwith value of secret created in point 2.
- remove
E.g.
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
- token: ${{secrets.FIREBASE_TOKEN}}
+ serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/apk/release/app-release-unsigned.apk- Open Google Cloud Console
- Select your project
- Click on
Create Service Account
- Enter some account name, press
Create and continue
- Select
Firebase App Distribution AdmininRoleinput and clickDone
- Then, on the list of accounts find your newly created service account. Click on 3-dots menu and click on
Manage keys
- Click on
Add keyand thenCreate new key
- Select type
JSONand clickCreate
- After that, the file should be downloaded to your disk. Open the file, and copy its content.
- Go to Github > your repository >
Settings>Secrets>Actions - Create a new secret. Name it e.g.
CREDENTIAL_FILE_CONTENT. The value of the secret is the content from the file copied in point 9. - Save the secret. Important! Remember about removing fetched file from your disk or store it in some secure place.
- Update configuration of your Github Actions. E.g.
E.g.
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
- token: ${{secrets.FIREBASE_TOKEN}}
+ serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: testers
file: app/build/outputs/apk/release/app-release-unsigned.apk