diff --git a/package.json b/package.json index 7ea1400a..0073fe71 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,13 @@ }, "homepage": "https://github.com/buttercup/desktop#readme", "build": { + "publish": [ + { + "provider": "github", + "owner": "buttercup", + "repo": "buttercup-desktop" + } + ], "afterPack": "./resources/scripts/afterPack.js", "afterAllArtifactBuild": "./resources/scripts/afterAllArtifactBuild.js", "appId": "pw.buttercup.desktop", @@ -145,23 +152,25 @@ ] } ], - "publish": [ - { - "provider": "github", - "owner": "buttercup", - "repo": "buttercup-desktop" - } - ], "directories": { "output": "dist" }, "win": { "icon": "./resources/build/icon.ico", - "artifactName": "${productName}-${os}-${env.NODE_ARCHITECTURE}-${version}.${ext}", + "artifactName": "${productName}-${os}-x64-${version}.${ext}", "target": [ - "nsis", - "portable", - "7z" + { + "target": "nsis", + "arch": ["x64"] + }, + { + "target": "portable", + "arch": ["x64"] + }, + { + "target": "7z", + "arch": ["x64"] + } ], "publisherName": [ "MadDev Oy", @@ -169,13 +178,13 @@ ] }, "nsis": { - "artifactName": "${productName}-${os}-${env.NODE_ARCHITECTURE}-${version}-installer.${ext}", + "artifactName": "${productName}-${os}-x64-${version}-installer.${ext}", "oneClick": false, "perMachine": false, "include": "./resources/build/installer.nsh" }, "portable": { - "artifactName": "${productName}-${os}-${env.NODE_ARCHITECTURE}-${version}-portable.${ext}" + "artifactName": "${productName}-${os}-x64-${version}-portable.${ext}" } }, "jest": { diff --git a/resources/scripts/publish.js b/resources/scripts/publish.js index 82f409c8..df76364b 100644 --- a/resources/scripts/publish.js +++ b/resources/scripts/publish.js @@ -12,18 +12,14 @@ async function buildApp() { await promisify(exec)("npm run build"); } -async function buildMac() { - console.log("Building Mac..."); +async function buildBundle() { + console.log("Assembling bundles..."); const result = await builder.build({ - targets: builder.Platform.MAC.createTarget() - }); - console.log("Result:", result); -} - -async function buildLinux() { - console.log("Building Linux..."); - const result = await builder.build({ - targets: builder.Platform.LINUX.createTarget() + targets: new Map([ + ...builder.Platform.MAC.createTarget(), + ...builder.Platform.LINUX.createTarget(), + ...builder.Platform.WINDOWS.createTarget() + ]) }); console.log("Result:", result); } @@ -41,7 +37,7 @@ async function routine(...callbacks) { } } -routine(clean, buildApp, buildLinux) +routine(clean, buildApp, buildBundle) .then(() => { console.log("Done."); })