might be very late but as of today ( sun, 19th oct 2025 ) these steps worked for me. I am using electron-builder.
all we have to do is just make a "build/icons" folder and place icons for mac, win and linux.
so
icon.icns - for mac
icon.png - for linux
icon.ico - for window
and run the build command and this will generate the installer icons that you will have on .exe, etc.
thanks