Upload APKs to Google Play
This package offers a streamlined way to publish packages in the Google Play Store
npm install -g google-play-publisher
First you have to create a Google Play API Access. To do that go to the Google Play Developer Console and then with the account owner go to Settings -> API access and create a Google Play Android Developer project.
After that follow the instructions to create a Service Account. When you click Create Client ID, choose Service Account. You will get a JSON file with a public key and the service email.
google-play-publisher \
--auth api.json \
--recent-changes "en-US=`cat changes.txt`" \
/path/to/Package.apk
--track
Specify track for this release. Can be alpha, beta, production or rollout. Default: alpha
var publisher = require('google-play-publisher')({
client_email: '',
private_key: '',
})
var changes = fs.readFileSync('changes.txt')
// track can be alpha, beta, production or rollout
publisher.upload('/path/to/apk', {
track: 'beta', // default alpha
recentChanges: {
'en-US': changes
},
}, function (err) {
})