Merge pull request #45 from boswelja/name-output-improvements

Name output improvements
This commit is contained in:
Drew Heavner
2020-12-08 09:32:42 -05:00
committed by GitHub
3 changed files with 8 additions and 2 deletions

View File

@@ -72,6 +72,10 @@ The mapping.txt file used to de-obfuscate your stack traces from crash reports
## Outputs
### `releaseName`
The name of the release published to Google Play, which is generated on commit by default
### `internalSharingDownloadUrl`
The download url for an app that was uploaded using the `track` `internalsharing`

View File

@@ -80,7 +80,8 @@ function uploadToPlayStore(options, releaseFiles) {
// Simple check to see whether commit was successful
if (res.data.id != null) {
core.debug(`Successfully committed ${res.data.id}`);
core.setOutput("releaseName", getPublishedReleaseName(res.data, options));
const name = options.name || (yield getPublishedReleaseName(res.data, options));
core.setOutput("releaseName", name);
return Promise.resolve(res.data.id);
}
else {

View File

@@ -77,7 +77,8 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri
// Simple check to see whether commit was successful
if (res.data.id != null) {
core.debug(`Successfully committed ${res.data.id}`);
core.setOutput("releaseName", getPublishedReleaseName(res.data, options))
const name = options.name || (await getPublishedReleaseName(res.data, options));
core.setOutput("releaseName", name)
return Promise.resolve(res.data.id!);
} else {
core.setFailed(`Error ${res.status}: ${res.statusText}`);