Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba5abd87ce | ||
|
|
d4681f654d | ||
|
|
bda8b09ade |
@@ -72,10 +72,6 @@ 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
|
||||
|
||||
### `internalSharingDownloadUrls`
|
||||
|
||||
A JSON list containing the download urls for every release file uploaded using the `track` `internalsharing`
|
||||
|
||||
34
lib/edits.js
34
lib/edits.js
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
@@ -40,17 +40,17 @@ 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 = []
|
||||
let downloadUrls = [];
|
||||
for (const releaseFile of releaseFiles) {
|
||||
core.debug(`Uploading ${releaseFile}`);
|
||||
yield uploadInternalSharingRelease(options, releaseFile)
|
||||
.then(downloadUrl => {
|
||||
downloadUrls.push(downloadUrl)
|
||||
})
|
||||
downloadUrls.push(downloadUrl);
|
||||
})
|
||||
.catch(reason => {
|
||||
core.setFailed(reason);
|
||||
return Promise.reject(reason);
|
||||
});
|
||||
core.setFailed(reason);
|
||||
return Promise.reject(reason);
|
||||
});
|
||||
}
|
||||
core.setOutput("internalSharingDownloadUrls", downloadUrls);
|
||||
core.exportVariable("INTERNAL_SHARING_DOWNLOAD_URLS", downloadUrls);
|
||||
@@ -83,16 +83,6 @@ function uploadToPlayStore(options, releaseFiles) {
|
||||
core.info(`Adding ${versionCodes.length} artifacts to release on '${options.track}' track`);
|
||||
const track = yield addReleasesToTrack(appEdit.data, options, versionCodes);
|
||||
core.debug(`Track: ${track}`);
|
||||
// Extract the release name for the response
|
||||
let trackReleaseName;
|
||||
if (track.releases && track.releases.length > 0) {
|
||||
const trackRelease = track.releases[0];
|
||||
trackReleaseName = trackRelease.name;
|
||||
core.debug(`Pulled track release name from update: ${trackReleaseName}`);
|
||||
}
|
||||
else {
|
||||
core.debug(`Didn't find any releases on the track`);
|
||||
}
|
||||
// Commit the pending Edit
|
||||
core.info(`Committing the Edit`);
|
||||
const res = yield androidPublisher.edits.commit({
|
||||
@@ -102,15 +92,7 @@ function uploadToPlayStore(options, releaseFiles) {
|
||||
});
|
||||
// Simple check to see whether commit was successful
|
||||
if (res.data.id != null) {
|
||||
core.debug(`Successfully committed ${res.data.id}`);
|
||||
const name = options.name || trackReleaseName;
|
||||
core.info(`Successfully committed release ${name}`);
|
||||
if (name) {
|
||||
core.setOutput("releaseName", name);
|
||||
}
|
||||
else {
|
||||
core.debug("Unable to set 'releaseName' output.");
|
||||
}
|
||||
core.info(`Successfully committed ${res.data.id}`);
|
||||
return Promise.resolve(res.data.id);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
|
||||
19
src/edits.ts
19
src/edits.ts
@@ -79,16 +79,6 @@ export async function uploadToPlayStore(options: EditOptions, releaseFiles: stri
|
||||
const track = await addReleasesToTrack(appEdit.data, options, versionCodes);
|
||||
core.debug(`Track: ${track}`);
|
||||
|
||||
// Extract the release name for the response
|
||||
let trackReleaseName: string | undefined | null;
|
||||
if (track.releases && track.releases.length > 0) {
|
||||
const trackRelease = track.releases[0];
|
||||
trackReleaseName = trackRelease.name;
|
||||
core.debug(`Pulled track release name from update: ${trackReleaseName}`)
|
||||
} else {
|
||||
core.debug(`Didn't find any releases on the track`)
|
||||
}
|
||||
|
||||
// Commit the pending Edit
|
||||
core.info(`Committing the Edit`)
|
||||
const res = await androidPublisher.edits.commit({
|
||||
@@ -99,14 +89,7 @@ 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}`);
|
||||
const name = options.name || trackReleaseName;
|
||||
core.info(`Successfully committed release ${name}`)
|
||||
if (name) {
|
||||
core.setOutput("releaseName", name);
|
||||
} else {
|
||||
core.debug("Unable to set 'releaseName' output.");
|
||||
}
|
||||
core.info(`Successfully committed ${res.data.id}`);
|
||||
return Promise.resolve(res.data.id!);
|
||||
} else {
|
||||
core.setFailed(`Error ${res.status}: ${res.statusText}`);
|
||||
|
||||
Reference in New Issue
Block a user