Electron builder DMG packaging cannot be performed in non Mac platforms according to comments of isuues.
But we can use package dmgs using mkfs.hfsplus. How to integrate electron packager with hfsplus for a direct build?
You could use either a Makefile or the package.json straight away and chain those commands together.
genisoimage -q -V <A-name-of-your-choice> -D -R -apple -no-pad -m "LICENSE" -m "LICENSES.chromium.html" -m "version" -o ./dist/<A-name-of-your-choice>.dmg ./path/to/dist