From 067b6b1f92ebef112462641e59b0342d23d002c1 Mon Sep 17 00:00:00 2001 From: Darius Letterman Date: Wed, 16 Nov 2022 17:03:29 +0100 Subject: [PATCH] fix issue when publishing to other flavors also including auto channel selection for 'rc' versions --- .../publisher/electron-release-server/src/PublisherERS.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/publisher/electron-release-server/src/PublisherERS.ts b/packages/publisher/electron-release-server/src/PublisherERS.ts index 3902cf9d97..fd46396542 100644 --- a/packages/publisher/electron-release-server/src/PublisherERS.ts +++ b/packages/publisher/electron-release-server/src/PublisherERS.ts @@ -85,6 +85,8 @@ export default class PublisherERS extends PublisherBase { let channel = 'stable'; if (config.channel) { channel = config.channel; + } else if (packageJSON.version.includes('rc')) { + channel = 'rc'; } else if (packageJSON.version.includes('beta')) { channel = 'beta'; } else if (packageJSON.version.includes('alpha')) { @@ -127,7 +129,7 @@ export default class PublisherERS extends PublisherBase { d('attempting to upload asset:', artifactPath); const artifactForm = new FormData(); artifactForm.append('token', token); - artifactForm.append('version', packageJSON.version); + artifactForm.append('version', `${packageJSON.version}_${flavor}`); artifactForm.append('platform', ersPlatform(makeResult.platform, makeResult.arch)); // see https://github.com/form-data/form-data/issues/426