是否有Android开发者API实现应用审核与发布全流程自动化?
Great question—you absolutely can automate more than just the APK upload step! Let’s break down how to tie together the Google Play Developer API and Fastlane to cover the full release/update workflow, including review triggers and publishing.
First, Clarifying the Google Play Developer API Capabilities
You’re right that there’s no "dedicated review API," but the Edits endpoint does far more than just upload binaries. It lets you manage every part of the release lifecycle, including submitting builds for review and triggering publishing once approval is done.
Here’s the core workflow for the API:
- Create an "edit" session (a temporary workspace for your changes)
- Upload your APK/AAB to the target track (Alpha, Beta, Production)
- Configure release settings (like rollout percentage, release status)
- Submit the edit to trigger review and/or publishing
Using Fastlane to Automate the Full Flow
Fastlane’s supply plugin is built on top of the Google Play Developer API, so you don’t have to write raw API calls. It can handle uploads, metadata updates, and most importantly, triggering review and publishing.
Example Fastlane Lane for Automated Production Release
Add this to your Fastfile to automate building, uploading, submitting for review, and publishing (with optional phased rollout):
lane :deploy_to_production do # Build your release bundle (adjust for APK if needed) gradle(task: 'bundleRelease') # Use supply to handle the full release workflow supply( track: 'production', release_status: 'completed', # Triggers submission for review + publishing (if auto-release is enabled) rollout: '0.3', # Optional: 30% phased rollout skip_upload_metadata: true, # Skip if you don't need to update descriptions/screenshots skip_upload_images: true, skip_upload_screenshots: true ) end
Key Settings to Enable Automation
Auto-Release in Google Play Console:
- Go to your app’s Google Play Console → Release → Production → Settings
- Enable "Automatically release to production once approved"
- With this on, once Google’s automated review passes (or manual review is done), your build will go live automatically—no manual browser steps needed.
Handle Manual Reviews:
- If your update requires human review (e.g., new permissions, content changes), the API can still submit the build for review automatically. You can then use the API to poll the review status (via the
tracks.getendpoint) and trigger publishing once it’s approved, or leave auto-release enabled to let Google handle it.
- If your update requires human review (e.g., new permissions, content changes), the API can still submit the build for review automatically. You can then use the API to poll the review status (via the
Service Account Permissions:
- Make sure your service account (used by Fastlane/supply) is added to your Google Play Console project with the Admin (all permissions) or Release Manager role. Without this, you’ll run into permission errors when trying to submit releases.
What About Post-Review Publishing (If Auto-Release Is Off)?
If you prefer manual control over when builds go live after review, you can use the API to update the track’s release status:
- After review is approved, create a new edit session
- Update the track’s
releaseStatustocompleted(full release) orrolledout(phased) - Submit the edit to trigger publishing
Fastlane’s supply can also handle this—just adjust the release_status parameter in your lane to match your desired state.
Summary
You don’t have to stop at just uploading APKs. By combining Fastlane’s supply plugin with the Google Play Developer API (and configuring the right console settings), you can automate:
- Build uploads
- Submitting builds for review
- Phased or full publishing (either automatically after review, or on demand)
The only step you can’t automate is bypassing manual reviews when Google requires them—but you can still submit the request automatically and let the API handle the rest once approval comes through.
内容的提问来源于stack exchange,提问作者Seba Rossi

