🚀 Upload APKs to Google Play
This package offers a streamlined way to publish packages in the Google Play Store.
A fork of playup.
npm install -g apkup
Use the CLI
apkup \
--auth api.json \
--recent-changes "en-US='lorem ipsum dolor'" \
--file /path/to/Package.apk \
--obbs /path/to/Expansion.obb \ # optional
--obbs /path/to/Expansion2.obb # optional
or the JavaScript API
const { Apkup } = require("apkup");
const apkup = Apkup({
client_email: "",
private_key: ""
});
apkup
.upload("/path/to/apk", {
obbs: [
// optional expansion files (max 2)
"/path/to/somefile.obb"
],
recentChanges: {
"en-US": "lorem ipsum dolor"
}
})
.then(data => {
console.log(` > ${data.packageName} version ${data.versionCode} is up!`);
});
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.
The created Service Account needs the following role:
- Release manager
The upload
method returns a Promise
so this package can be used in conjunction with gulp with no extra plugins needed
gulp.task(upload, () => {
return publisher.upload(apk, params);
});
Required
Type: File
a JSON file with the Authentication information
Required
Type: string
A string with the format lang=changes
where lang is the language code and changes the string that specifies the changes of this
Type: string
Specify track for this release. Can be alpha, beta, production or rollout. Default: alpha
The path to the APK
The path to 1 or more expansion files
See the API docs.