I am trying to setup a pipeline that adds the apk to the app distribution in firebase. I have the following yml:
Getting error in Authenticate Firebase CLI using service account key
.
# Step 19: Install Firebase tools.
- task: CmdLine@2
displayName: 'Install Firebase Tools'
inputs:
script: 'curl -sL firebase.tools | bash'
workingDirectory: '$(Agent.ToolsDirectory)'
# Step 20: Authenticate Firebase CLI using service account key.
- script: |
echo "$FIREBASE_SA_KEY" > serviceAccountKey.json
export GOOGLE_APPLICATION_CREDENTIALS=$(Agent.TempDirectory)/serviceAccountKey.json
firebase use --add
displayName: 'Authenticate Firebase CLI'
env:
FIREBASE_SA_KEY: $(FIREBASE_SA_KEY)
# Step 21: Distribute APK to Firebase using Firebase CLI.
- task: CmdLine@2
displayName: 'Deploy APK to Firebase'
inputs:
script: |
firebase appdistribution:distribute $(System.DefaultWorkingDirectory)/build/app/outputs/flutter-apk/*uat-release.apk \
--app "app_id" \
--release-notes "$(Pipeline.Workspace)/ReleaseNotes/combined_release_notes.txt"
workingDirectory: $(System.DefaultWorkingDirectory)
I don't find that what is wrong and how to fix it. Any help is appreciated.