# google-playstore-publisher

> Publish your app to google playstore using publisher api https://developers.google.com/android-publisher/#publishing

Latest version **2.0.2** (published 2022-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install google-playstore-publisher
pnpm add google-playstore-publisher
yarn add google-playstore-publisher
bun add google-playstore-publisher
```

Provides the command `playstore`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2022-05-08 |
| First published | 2019-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Yogesh Lakhotia |
| Maintainers | mr-yogesh |
| Keywords | playstore, publisher, androidpublisher, googleplay, apppublish, googlestore |

## Links

- npm: https://www.npmjs.com/package/google-playstore-publisher
- Repository: https://github.com/mryogesh/google-playstore-publisher
- Homepage: https://github.com/mryogesh/google-playstore-publisher#readme
- Issues: https://github.com/mryogesh/google-playstore-publisher/issues
- npm.io page: https://npm.io/package/google-playstore-publisher

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.21.1
- [yargs](https://npm.io/package/yargs.md) ^13.2.2
- [googleapis](https://npm.io/package/googleapis.md) ^84.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2022-05-08
- 1.0.7 — 2019-05-06
- 1.0.6 — 2019-05-04
- 1.0.5 — 2019-05-03
- 1.0.4 — 2019-05-03
- 1.0.2 — 2019-05-03
- 1.0.1 — 2019-05-03
- 1.0.0 — 2019-05-03

## README

# google-playstore-publisher 

 > Upload APKs to Google Play with api or cli (command line)

This package offers api and cli tool to publish apk in the Google Play Store


## Authentication

Steps to get your service account file from Google Cloud Platform

- Go to your GCP Project https://console.cloud.google.com/iam-admin/serviceaccounts (Create gcp project if you don't have one)
- Create service account (In 3rd step you will get option to create the key), store that key, that will be used to upload apk to playstore 
- Go to https://play.google.com/apps/publish
- Go to Settings -> Developer account -> API access
- Now, Grant permission to service account we created (Choose role as a release manager) -> click Add user

> It can take upto 24 hours to grant permission to service account, so don't worry if you get authentication error


## Install

```
npm install -g google-playstore-publisher
```

or

```
yarn global add google-playstore-publisher
```

## Usage

Use the CLI

```bash
playstore \ 
    -t=internal \ # values can be (internal, alpha, beta, production)
    -p=com.example.android \
    -k=playstore_service_account.json \ 
    -a=./app-release.apk
```

or the JavaScript API

```javascript
const playstore = require('google-playstore-publisher');
const path = require('path');

try {
    const data = await playstore.publish({
      keyFilePath: path.join(
        __dirname,
        '../../../playstore-service-account.json'
      ),
      packageName: 'com.example.android',
      track: 'internal', // value (internal, alpha, beta, production)
      apkFilePath: path.join(__dirname, '../../../app-release.apk')
    });
    console.log(data);
} catch (e) {
  console.log(e);
}
```

---
_Source: https://npm.io/package/google-playstore-publisher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
