Setting Up Deployment to Google Play for Your Expo App
Complete guide covering two approaches to deploy your Expo React Native app to Google Play: using EAS Submit and traditional Fastlane setup with step-by-step instructions.
Deploying your Expo React Native app to the Google Play Store is a crucial step in reaching your users. Whether you're publishing your first app or streamlining your deployment workflow, choosing the right deployment strategy can save you time and reduce complexity.
There are two main approaches to deploy your Expo app to Google Play:
- Using EAS Submit (Recommended for Expo apps)
- Setting up traditional Fastlane
This guide will walk you through both options, starting with the simpler EAS approach which is better integrated with your existing Expo setup, followed by the more customizable Fastlane option for advanced use cases.
Option 1: Using EAS Submit (Recommended)
If you already have an eas.json
file with a submit configuration, you have a great start! Here's how to complete the setup:
1. Create a Google Play Service Account
- Go to the Google Play Console
- Navigate to Setup > API access
- Create a new service account or link an existing one
- Grant the necessary permissions (at minimum "Release Manager" role)
- Create and download the JSON key file
- Save this file in your project (e.g., as
google-service-account.json
) - Add this file to your
.gitignore
to keep it secure
2. Update your EAS Submit Configuration
Update your eas.json
file to point to the correct service account key path:
{
"submit": {
"production": {
"android": {
"serviceAccountKeyPath": "./google-service-account.json",
"track": "production"
}
}
}
}
You can also add other tracks like "internal", "alpha", or "beta" if needed.
3. Build a Production APK/AAB
Before submitting, you need to build a production version:
eas build --platform android --profile production
4. Submit to Google Play
Once the build completes, submit it to Google Play:
eas submit --platform android --profile production
Option 2: Setting Up Traditional Fastlane
If you need more customization or want to integrate with other CI/CD systems, traditional Fastlane is a good option:
1. Install Fastlane
# Install Ruby if not already installed
brew install ruby
# Install Fastlane
gem install fastlane
2. Initialize Fastlane in your Android project
cd android
fastlane init
Follow the prompts to set up your Fastlane configuration.
3. Set up your Fastfile
Create or modify android/fastlane/Fastfile
with the following content:
default_platform(:android)
platform :android do
desc "Deploy to Google Play"
lane :deploy do
# Build your Android app
gradle(
task: "bundle",
build_type: "Release"
)
# Upload to Google Play
upload_to_play_store(
track: 'production',
json_key: 'path/to/your/google-service-account.json',
aab: 'app/build/outputs/bundle/release/app-release.aab'
)
end
end
4. Create a Keystore for Signing
If you don't already have a keystore:
keytool -genkey -v -keystore android/app/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
5. Configure Gradle for Signing
Update your android/app/build.gradle
file:
android {
// ...
signingConfigs {
release {
storeFile file('upload-keystore.jks')
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias 'upload'
keyPassword System.getenv("KEY_PASSWORD")
}
}
buildTypes {
release {
signingConfig signingConfigs.release
// ...
}
}
}
6. Run Fastlane
cd android
fastlane deploy
Recommendation
For an Expo app, I recommend using EAS Submit (Option 1) because:
- It's better integrated with the Expo ecosystem
- It handles the build process automatically
- It manages app signing for you
- It's simpler to set up and maintain
The only prerequisite is to create and configure the Google Play service account key file, then update the path in your eas.json
file.
Next Steps
- Create your Google Play service account and download the key file
- Update your
eas.json
with the correct path to the key file - Run
eas build
followed byeas submit
Conclusion
Both deployment methods have their merits, but for most Expo developers, EAS Submit offers the best balance of simplicity and functionality. It integrates seamlessly with your existing Expo workflow and handles most of the complexity for you.
Choose EAS Submit if you:
- Want a streamlined deployment process
- Are already using EAS Build for your builds
- Prefer minimal configuration and setup
Choose Fastlane if you:
- Need advanced customization options
- Want to integrate with existing CI/CD pipelines
- Require more control over the build and deployment process
With either approach, you'll be able to successfully deploy your Expo React Native app to the Google Play Store and reach your Android users.