You can read more about available actions here, and it's even possible to create your own.
desc "Submit a new Internal Build to Play Store" lane :internal do upload_to_play_store(track : ' internal', apk : ' app/build/outputs/apk/release/app-release.apk') end desc "Promote Internal to Alpha" lane :promote_internal_to_alpha do upload_to_play_store(track : ' internal', track_promote_to : ' alpha') end desc "Promote Alpha to Beta" lane :promote_alpha_to_beta do upload_to_play_store(track : ' alpha', track_promote_to : ' beta') end desc "Promote Beta to Production" lane :promote_beta_to_production do upload_to_play_store(track : ' beta', track_promote_to : ' production') end endĪn important note is that we've only scratched the surface of the kinds of actions that fastlane can automate.
Later we'll see how to inject the json_key_file in your CI/CD pipeline at runtime. fastlane/Appfile is pretty straightforward, and contains basic configuration you chose when you initialized your project. From this point you're able to manage all of your store content as-code when we publish a new version to the store later, the versions of content checked into your source repo will be used to populate the entry. Once you've set this up, simply run bundle exec fastlane supply init and all your current metadata will be downloaded from your store listing and saved in fastlane/metadata/android. Please refer to these detailed instructions for collecting the credentials necessary to run supply. Supply is a feature built into fastlane which will help you manage screenshots, descriptions, and other localized metadata/assets for publishing to the Google Play Store. fastlane directory containing its configuration. Run bundle exec fastlane init from within your project directory, answer a few questions, and fastlane will create a new. Now that we have fastlane ready to run, we just need to initialize our repo with our configuration. to ensure the command runs within the context of our project environment. Later, you'll see that in CI/CD we use bundle install. From this point you can run fastlane by typing bundle exec fastlane.
Once your Gemfile is updated, you can run bundle update to update/generate your Gemfile.lock.
You can read about other install options in the fastlane documentation. We're using the Ruby fastlane gem so you'll need Ruby on your system for this to work. Initializing your projectįirst up, you need to get fastlane installed locally and initialize your product. We'll begin first by setting up fastlane in our project, make a couple key changes to our Gradle configuration, and then wrap everything up in a GitLab pipeline.įastlane has pretty good documentation to get you started, and if you run into platform-specific trouble it's the first place to check, but to get under way you really just need to complete a few straightforward steps. gitlab-ci.yml, adle, Dockerfile, and fastlane configuration.
If you'd like to jump ahead and see the finished product, you can take a look at the already-completed Gitter for Android. Containerized build environment, available in GitLab's container registry.Manual promotion through alpha, beta, and production channels.Automatic publishing to internal distribution channel in Google Play Store.Automatic signing, version numbers, and changelog.Content and images (metadata) for Google Play Store listing managed in source control.Source control, project home, issue tracking, and everything else that comes with GitLab.With GitLab and fastlane we're getting, with minimal effort: You can see an actual production deployment of the Gitter Android app that uses what we'll be implementing in this blog post suffice to say, the results were fantastic and we've become big believers that the combination of GitLab and fastlane is a truly game-changing way to enable CI/CD for your mobile applications. When we heard about fastlane, an app automation tool for delivering iOS and Android builds, we wanted to give it a spin to see if a combination of GitLab and fastlane could help us bring our mobile build and deployment automation to the next level.