Skip to content

Commit

Permalink
Only fetch release name if the user didn't specify one
Browse files Browse the repository at this point in the history
This should improve performance when manually setting a release name
  • Loading branch information
boswelja committed Dec 8, 2020
1 parent a899564 commit af37686
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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 || 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 || 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 af37686

Please sign in to comment.