Yes, it is possible as indicated in the Electron forge makers documentation:
- Squirrel.windows
You can only build the Squirrel.Windows target on a Windows machine or on a macOS /Linux machine with mono and wine installed
- Deb (linux)
You can only build the deb target on Linux or macOS machines with the fakeroot and dpkg packages installed.
makers: [
{
name: '@electron-forge/maker-dmg',
config: {
icon: `${iconPath}.icns`,
},
},
{
name: '@electron-forge/maker-squirrel',
config: {
authors: 'YOU',
iconUrl: 'https://your_site/favicon.ico',
exe: `${BUILD_NAME}.exe`,
name: BUILD_NAME,
},
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
bin: BUILD_NAME,
maintainer: 'YOU',
homepage: 'https://you home page',
},
},
},
],
Personally, I run the build in a Gitlab CI.
This allows the Windows shared runners use rather than a docker (linux) image with Mono because that was causing me some problems on Windows execution.
For the mac part I register a gitlab runner on my machine before launching the publish phase on gitlab.
I think you can achieve the same result very quickly with Travis who already has mac and windows runners available.
I hope I helped you. Good luck