I am building a react native app which compiles. I would like not to add the gradle plugin, but directly push my .apk
file to the alpha section of google play after a successful test (with travis-ci e.g)
Is there a way to do it?
I am building a react native app which compiles. I would like not to add the gradle plugin, but directly push my .apk
file to the alpha section of google play after a successful test (with travis-ci e.g)
Is there a way to do it?
You may follow this tutorial for Automating Publishing to the Play Store. This allows you to trigger builds on your continuous integration server (i.e. Jenkins) and have them uploaded the Play store for alpha or beta testing, as well as pushing to production directly.
Since you don't want to add the gradle plugin, you can configure a continuous integrations server such as Jenkins. You will need first to setup Google API access.
Setup for Google API access
Settings
-> API Access
.Service Accounts
section where you need to click the Create Service Account button
. Click on the link shown on the first step to visit the Google Developers Console.Create New Client ID
button.Service Account
. Make sure to also request the .p12 Key File
instead of JSON.Settings
-> API Access
. Make sure the checkboxes for Edit store listing, pricing & distribution
, Manage Production APKs
, and Manage Alpha & Beta APKs
are checked for the Google Service account used. (If you intend to upload an alpha or beta SDK through a Google service account, apparently these permissions must be checked according to this discussion.Setting Up Jenkins (for automating CI builds)
Manage Jenkins
-> Manage Plugins
. Assuming the plugin has not yet been installed, select the Available
tab and search for the Google Play Android Publisher Plugin
.Credentials
section in Jenkins and load the .p12
key file downloaded during the initial setup process of setting up Google API access. A basic walkthrough video also demonstrates how to do this step.Add a post-build step to your existing Jenkins project.
a. Make sure to choose the credential name from the drop-down list. It should belong to the Google Play account that manages the app.
b. Enter path and/or an Ant-style wildcard pattern for the APK. For instance, the example in the screenshot expects the APK to be generated inside **/build/outputs/apk/yourappname*.apk
.
c. Choose what track to which the APKs should be deployed (Alpha, Beta, Production).
d. You can create release notes before you start the build. If you forget to do this step or your automated process pushes the build, you can edit them later directly on the Google Play Developer Console.
Hope this helps!
I decided to post my solution as an answer, to avoid misleads. There are several ways to publish an APK to the Google Play Store, this solution above was very instructive but I went with https://fastlane.tools/