Skip to content

Commit

Permalink
Merge pull request r0adkll#45 from boswelja/name-output-improvements
Browse files Browse the repository at this point in the history
Name output improvements
  • Loading branch information
r0adkll authored Dec 8, 2020
2 parents a899564 + 264c36b commit f8ef4b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion lib/edits.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/edits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit f8ef4b6

Please sign in to comment.