Apple can ban your account for attempting to use the tooling and online services they want you to use to publish apps if you use them on non-apple hardware. We would like to have the build process of an app run in a fully reproducible VM, so far that is feasible on Linux, not so much macOS. And yet, to do signing and uploading, we would still need macOS.
maybe I am being naive, but is GitHub Actions macOS runners not enough for this? You mention just builds, so this is for CI I presume, sounds like the correct choice. Or is signing an issue with that approach?
Signing and uploading is the easier part. That can be done from any OS.
Look at my HN profile, my company sells a product called Conveyor that can take files as input and generate self-updating packages/installers for every desktop OS from any desktop OS. In other words it cross-builds macOS apps, Windows apps and Linux packages. Then it creates a download site that detects the users OS and gives them a big green button to click to download the right stuff.
For macOS it does signing, notarization and Sparkle integration with delta updates automatically. If you're building Electron or JVM apps you don't even need to compile anything, just supply the JS/JARs.
Apple don't care about this one way or another. They don't make it easy but they also don't stop it, and I've had good interactions with their official developer support agents in the past where I actually asked questions or reported bugs in the process of developing Conveyor. They were always friendly and approachable (unlike MS!).