Add multiple urls to internal sharing outputs
This commit is contained in:
15
lib/edits.js
15
lib/edits.js
@@ -40,13 +40,20 @@ function uploadToPlayStore(options, releaseFiles) {
|
||||
// Check the 'track' for 'internalsharing', if so switch to a non-track api
|
||||
if (options.track === 'internalsharing') {
|
||||
core.debug("Track is Internal app sharing, switch to special upload api");
|
||||
let downloadUrls = []
|
||||
for (const releaseFile of releaseFiles) {
|
||||
core.debug(`Uploading ${releaseFile}`);
|
||||
yield uploadInternalSharingRelease(options, releaseFile).catch(reason => {
|
||||
core.setFailed(reason);
|
||||
return Promise.reject(reason);
|
||||
});
|
||||
yield uploadInternalSharingRelease(options, releaseFile)
|
||||
.then(downloadUrl => {
|
||||
downloadUrls.push(downloadUrl)
|
||||
})
|
||||
.catch(reason => {
|
||||
core.setFailed(reason);
|
||||
return Promise.reject(reason);
|
||||
});
|
||||
}
|
||||
core.setOutput("internalSharingDownloadUrls", downloadUrls);
|
||||
core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URLS", downloadUrls);
|
||||
}
|
||||
else {
|
||||
// Create a new Edit
|
||||
|
||||
15
src/edits.ts
15
src/edits.ts
@@ -33,13 +33,20 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri
|
||||
// Check the 'track' for 'internalsharing', if so switch to a non-track api
|
||||
if (options.track === 'internalsharing') {
|
||||
core.debug("Track is Internal app sharing, switch to special upload api")
|
||||
let downloadUrls: string[] = []
|
||||
for (const releaseFile of releaseFiles) {
|
||||
core.debug(`Uploading ${releaseFile}`);
|
||||
await uploadInternalSharingRelease(options, releaseFile).catch(reason => {
|
||||
core.setFailed(reason);
|
||||
return Promise.reject(reason);
|
||||
});
|
||||
await uploadInternalSharingRelease(options, releaseFile)
|
||||
.then(downloadUrl => {
|
||||
downloadUrls.push(downloadUrl as string)
|
||||
})
|
||||
.catch(reason => {
|
||||
core.setFailed(reason);
|
||||
return Promise.reject(reason);
|
||||
});
|
||||
}
|
||||
core.setOutput("internalSharingDownloadUrls", downloadUrls);
|
||||
core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URLS", downloadUrls);
|
||||
} else {
|
||||
// Create a new Edit
|
||||
core.info(`Creating a new Edit for this release`)
|
||||
|
||||
Reference in New Issue
Block a user