[PM-38570] Testharness Firebase distribution (#7274)

This commit is contained in:
mpbw2 authored and GitHub committed 2026-08-18 13:50:07 +00:00
1 parent e9319c6bee
commit 75dfcfd903
2 files changed
+50

No files matched your search

+34
View File
@@ -4,6 +4,9 @@ on:
push:
paths:
- testharness/**
branches:
- main
- release/**/*
workflow_dispatch:
inputs:
version-name:
@@ -17,9 +20,16 @@ on:
patch_version:
description: "Order 999 - Overrides Patch version"
type: boolean
distribute-to-firebase:
description: "Optional. Distribute artifacts to Firebase."
required: false
default: true
type: boolean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTION_RUN_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
DISTRIBUTE_TO_FIREBASE: ${{ inputs.distribute-to-firebase || github.event_name == 'push' }}
permissions:
contents: read
@@ -78,6 +88,17 @@ jobs:
az storage blob download --account-name "$ACCOUNT_NAME" --container-name "$CONTAINER_NAME" \
--name testharness_apk-keystore.jks --file ${{ github.workspace }}/keystores/testharness_apk-keystore.jks --output none
- name: Download Firebase credentials
if: ${{ env.DISTRIBUTE_TO_FIREBASE == 'true' }}
env:
ACCOUNT_NAME: bitwardenci
CONTAINER_NAME: mobile
run: |
mkdir -p ${{ github.workspace }}/secrets
az storage blob download --account-name "$ACCOUNT_NAME" --container-name "$CONTAINER_NAME" \
--name app_play_dev_firebase-creds.json --file ${{ github.workspace }}/secrets/app_play_dev_firebase-creds.json --output none
- name: AZ Logout
uses: bitwarden/gh-actions/azure-logout@main
@@ -119,3 +140,16 @@ jobs:
name: com.bitwarden.testharness.apk-sha256.txt
path: ./com.bitwarden.testharness.apk-sha256.txt
if-no-files-found: error
- name: Install Firebase app distribution plugin
if: ${{ env.DISTRIBUTE_TO_FIREBASE == 'true' }}
run: bundle exec fastlane add_plugin firebase_app_distribution
- name: Distribute to Firebase - testharness.apk
if: ${{ env.DISTRIBUTE_TO_FIREBASE == 'true' }}
env:
APP_PLAY_FIREBASE_CREDS_PATH: ${{ github.workspace }}/secrets/app_play_dev_firebase-creds.json
run: |
bundle exec fastlane distributeTestHarnessReleaseToFirebase \
actionUrl:$GITHUB_ACTION_RUN_URL \
service_credentials_file:$APP_PLAY_FIREBASE_CREDS_PATH
+16
View File
@@ -467,6 +467,22 @@ platform :android do
)
end
desc "Publish release Test Harness APK to Firebase App Distribution"
lane :distributeTestHarnessReleaseToFirebase do |options|
releaseNotes = generateReleaseNotes(
repoName: "android",
actionUrl: "#{options[:actionUrl]}"
)
firebase_app_distribution(
app: "1:1093287226212:android:12f84f87c883e8604b2871",
android_artifact_type: "APK",
android_artifact_path: "testharness/build/outputs/apk/release/com.bitwarden.testharness.apk",
service_credentials_file: options[:service_credentials_file],
groups: "internal-prod-group, livefront",
release_notes: "#{releaseNotes}",
)
end
desc "Publish release AAB to Firebase"
lane :distributeAuthenticatorReleaseBundleToFirebase do |options|
release_notes = changelog_from_git_commits(