From b06f374506d634dab31f38ea863ed49512d82665 Mon Sep 17 00:00:00 2001 From: Riccardo Lattarulo Date: Tue, 22 Dec 2020 16:57:37 +0100 Subject: [PATCH] Add internal sharing download url to output --- lib/edits.js | 4 ++++ src/edits.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/edits.js b/lib/edits.js index e049cde2..eb752645 100644 --- a/lib/edits.js +++ b/lib/edits.js @@ -118,11 +118,15 @@ function uploadInternalSharingRelease(options, releaseFile) { return __awaiter(this, void 0, void 0, function* () { if (releaseFile.endsWith('.apk')) { const res = yield internalSharingUploadApk(options, releaseFile); + core.setOutput("internalSharingDownloadUrl", res.downloadUrl); + core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URL", res.downloadUrl); console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`); return Promise.resolve(res.downloadUrl); } else if (releaseFile.endsWith('.aab')) { const res = yield internalSharingUploadBundle(options, releaseFile); + core.setOutput("internalSharingDownloadUrl", res.downloadUrl); + core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URL", res.downloadUrl); console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`); return Promise.resolve(res.downloadUrl); } diff --git a/src/edits.ts b/src/edits.ts index ecce9e2f..a7947107 100644 --- a/src/edits.ts +++ b/src/edits.ts @@ -111,10 +111,14 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri async function uploadInternalSharingRelease(options: EditOptions, releaseFile: string): Promise { if (releaseFile.endsWith('.apk')) { const res = await internalSharingUploadApk(options, releaseFile) + core.setOutput("internalSharingDownloadUrl", res.downloadUrl); + core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URL", res.downloadUrl); console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`) return Promise.resolve(res.downloadUrl) } else if (releaseFile.endsWith('.aab')) { const res = await internalSharingUploadBundle(options, releaseFile) + core.setOutput("internalSharingDownloadUrl", res.downloadUrl); + core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URL", res.downloadUrl); console.log(`${releaseFile} uploaded to Internal Sharing, download it with ${res.downloadUrl}`) return Promise.resolve(res.downloadUrl) } else {