/appgallery-publisher

Upload or Upload & Publish your bundle (apk or aab) to Huawei AppGallery with ConnectApi

Primary LanguageJavaScriptApache License 2.0Apache-2.0

appgallery-publisher

Upload/Publish your bundle (apk or aab) to AppGallery automatically with appgallery-publisher

Usage

Query Params

- appId (required, string)
- submit (optional, boolean)

Body

{
    "client_id": "client_id",
    "client_secret": "client_secret",
    "artifact_path": "path" (etc: /Users/mustafa.yigit/Desktop/app-release.aab)
}

Request

POST -> http://localhost:3000/publish?appId=105596257&submit=true

Response

* upload only

"result": {
    "packageVersion": "98591645147584"
}

* upload & publish

"result": "success"

Steps

  1. getToken(clientId, clientSecret)
  2. getUploadUrl(appId, suffix, clientId, token)
  3. getArtifactFromPath(path)
  4. uploadArtifact(artifact, suffix, uploadUrl, authCode)
  5. updateConsole(appId, suffix, clientId, token, uploadResult)
  6. publish(token, clientId, appId)