Notifio ships three installers: one NSIS setup for Windows and two DMGs for Mac, because a universal build would bundle two copies of Chromium. They are built locally, uploaded to Cloudflare R2 under fixed object keys, and served through an API route that presigns a URL and redirects to it.
That means one filename, notifio-arm64.dmg , has to be written identically in three files that know nothing about each other.
The triangle
First, electron-builder decides what the file on disk is called:
"mac" : { "target" : [{ "target" : "dmg" , "arch" : [ "arm64" , "x64" ] }], "artifactName" : "notifio-${arch}.dmg" } , "win" : { "target" : [ "nsis" ], "artifactName" : "notifio-setup.exe" }
Enter fullscreen mode
Exit fullscreen mode
Second, the release script decides what to upload and under what key, and its comment is doing all of the work that a type would otherwise do:
// Artifact name -> content type.…