Git Product home page Git Product logo

upload-google-play's Introduction

Upload Android release to the Play Store

This action will help you upload an Android .apk or .aab (Android App Bundle) file to the Google Play Console using the Google Play Developer API v3.

Inputs

Input Description Value Required
releaseFiles The Android release file(s) to upload (.apk or .aab) Comma-separated paths. Supports glob via fast-glob true
serviceAccountJsonPlainText The service account json in plain text, provided via a secret, etc The contents of your service-account.json true (or serviceAccountJson)
packageName The package name, or Application Id, of the app you are uploading A valid package name, e.g. com.example.myapp. The packageName must already exist in the play console account, so make sure you upload a manual apk or aab first through the console true
track The track in which you want to assign the uploaded app. Defaults to production See APKs and Tracks documentation for calculating your target track name true
releaseName The release name. Not required to be unique. Default is configured by Google Play Console A user-friendly update name, e.g. v1.0.0 false
inAppUpdatePriority In-app update priority of the release. All newly added APKs in the release will be considered at this priority. Defaults to 0 [0-5], where 5 is the highest priority false
userFraction Percentage of users who should get the staged version of the app. (0.0-1.0) false
status Release status. Defaults to completed. One of completed, inProgress, halted, draft. Cannot be null. false
whatsNewDirectory The directory of localized "whats new" files to upload as the release notes. The files contained in the whatsNewDirectory MUST use the pattern whatsnew-<LOCALE> where LOCALE is using the BCP 47 format A path to a valid whatsNewDirectory false
mappingFile The mapping.txt file used to de-obfuscate your stack traces from crash reports A path to a valid mapping.txt file false
debugSymbols The native-debug-symbols.zip file or folder that contains your debug symbols A path to a valid native-debug-symbols.zip file file or a folder false
changesNotSentForReview Indicates that the changes in this edit will not be reviewed until they are explicitly sent for review from the Google Play Console. Defaults to false true or false false
serviceAccountJson The service account json private key file to authorize the upload request. Can be used instead of serviceAccountJsonPlainText to specify a file rather than provide a secret A path to a valid service-account.json file true (or serviceAccountJsonPlainText)
existingEditId The ID of an existing edit that has not been completed. If this is supplied, the action will append information to that rather than creating an edit A valid, unpublished Edit ID false
releaseFile Please switch to using releaseFiles as this will be removed in the future false

Outputs

Output Environment Variable Description
internalSharingDownloadUrls INTERNAL_SHARING_DOWNLOAD_URLS A JSON list containing the download urls for every release file uploaded using the internalsharing track
internalSharingDownloadUrl INTERNAL_SHARING_DOWNLOAD_URL The download url for the last release file uploaded using the internalsharing track

Example usage

The below example publishes MyApp to Google Play, targetting 33% (0.33) of users with a priority of 2.

uses: r0adkll/upload-google-play@v1
with:
  serviceAccountJsonPlainText: ${{ SERVICE_ACCOUNT_JSON }}
  packageName: com.example.MyApp
  releaseFiles: app/build/outputs/bundle/release/app-release.aab
  track: production
  status: inProgress
  inAppUpdatePriority: 2
  userFraction: 0.33
  whatsNewDirectory: distribution/whatsnew
  mappingFile: app/build/outputs/mapping/release/mapping.txt
  debugSymbols: app/intermediates/merged_native_libs/release/out/lib

Configure service account

  1. Configure service account in Google Cloud Platform
    1. Navigate to https://cloud.google.com/gcp
    2. Open IAM and admin > Service accounts > Create service account
    3. Pick a name and add appropriate permissions (e.g. 'owner)
    4. Open the newly created service account, click on keys tab and add a new key, JSON type
    5. When successful, a JSON file will be automatically downloaded on your machine
    6. Store the content of this file to your GitHub secrets, e.g. SERVICE_ACCOUNT_JSON.
  2. Add user to Google Play Console
    1. Open https://play.google.com/console and pick your developer account
    2. Open Users and permissions
    3. Click invite new user and add the email of the service account created in the previous step
    4. Grant permissions to the app that you want the service account to deploy in app permissions
  3. Enable the Google Play Android Developer API
    1. Go to https://console.cloud.google.com/apis/library/androidpublisher.googleapis.com
    2. Click on Enable

FAQ

I get the error "Package not found"

Make sure you upload an apk or aab manually first by creating a release through the play console.

The whatsNewDirectory in this example supplies changelogs for English, German and Japanese

distribution/
└─ whatsnew/
  ├─ whatsnew-en-US
  ├─ whatsnew-de-DE
  └─ whatsnew-ja-JP

upload-google-play's People

Contributors

boswelja avatar r0adkll avatar dependabot[bot] avatar diogoabu avatar xom9ikk avatar lriccardo avatar vitusortner avatar dougkeen avatar tobiasschuerg avatar thomasaunvik avatar sindrenm avatar shichen85 avatar saalihou avatar rufus125 avatar pamartineza avatar phicdy avatar milis92 avatar etabakov avatar achep avatar amadeu01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.