A script for uploading Android App Bundles to Google Play Store.
Use these instructions to obtain service key file (JSON) and grant access to upload app bundles.
You will only need Edit and delete draft apps
permission.
$ pip3 install -r requirements.txt
$ python3 upload.py \
--package-name 'com.example.myapp' \
# to pass JSON instead of file, use --key-json
--key-path '/path/to/service/account/key/file' \
--aab-path '/path/to/aab/file'
Example of usage in GitHub Actions workflow:
steps:
# ...
- name: Upload AAB
uses: italankin/[email protected]
with:
package-name: 'com.example.app'
aab-path: 'app/build/outputs/bundle/release/app-release.aab'
key-json: '${{ secrets.SERVICE_KEY_JSON }}'
Docker image is available at ghcr.io.
$ docker run --rm -it \
-v "$(pwd)/com.example.myapp.aab":'/data/bundle.aab' \
-v "$(pwd)/service-account-key.json":'/data/key.json' \
ghcr.io/italankin/google-play-aab-uploader \
--package-name 'com.example.myapp' \
--key-path '/data/key.json' \
--aab-path '/data/bundle.aab'
You can also use it with CI tools like Drone:
kind: pipeline
type: docker
name: upload-bundle
steps:
...
- name: upload
image: ghcr.io/italankin/google-play-aab-uploader
environment:
GOOGLE_PLAY_KEY_BASE64:
from_secret: google_play_key_base64
commands:
- echo "$GOOGLE_PLAY_KEY_BASE64" | base64 -d > key.json
- >
python /google-play-uploader/upload.py \
--package-name com.example.myapp \
--key-path key.json \
--aab-path app/build/outputs/bundle/release/app-release.aab