Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fastlane lane to deploy apk to Firebase #5175

Merged
merged 5 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-firebase_app_distribution (0.9.1)
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
fastlane-plugin-property_file_read (1.0.1)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.53.0)
Expand All @@ -119,6 +122,10 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-firebaseappdistribution_v1 (0.3.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-firebaseappdistribution_v1alpha (0.2.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
Expand Down Expand Up @@ -213,6 +220,7 @@ PLATFORMS

DEPENDENCIES
fastlane
fastlane-plugin-firebase_app_distribution
fastlane-plugin-property_file_read

BUNDLED WITH
Expand Down
19 changes: 17 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ platform :android do

end

desc "Upload APK to Play Store internal testing track"
desc "Upload AAB to Play Store internal testing track and APK to Firebase"
lane :deploy_dogfood do |options|

UI.message("Aab path: #{options[:aab_path]}")
Expand All @@ -182,7 +182,22 @@ platform :android do
validate_only: false
)

end
versionCode = google_play_track_version_codes(track: 'internal').max
apkPath = "duckduckgo.apk"

download_universal_apk_from_google_play(
version_code: versionCode,
destination: apkPath
)

firebase_app_distribution(
app: "1:239339218528:android:732e03dcf13d1488db8505",
groups: "ddg-employees",
android_artifact_type: "APK",
android_artifact_path: apkPath
)

end

desc "Deploy APK to GitHub"
lane :deploy_github do
Expand Down
1 change: 1 addition & 0 deletions fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-property_file_read'
gem 'fastlane-plugin-firebase_app_distribution'
10 changes: 9 additions & 1 deletion fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Update GitHub release notes
[bundle exec] fastlane android deploy_dogfood
```

Upload APK to Play Store internal testing track
Upload AAB to Play Store internal testing track and APK to Firebase

### android deploy_github

Expand All @@ -55,6 +55,14 @@ Upload APK to Play Store internal testing track

Deploy APK to GitHub

### android tag_and_push_release_version

```sh
[bundle exec] fastlane android tag_and_push_release_version
```

Create a new release branch and update the version

### android release

```sh
Expand Down
Loading