It's unfortunately not legal. Makes it also not commercially viable. Cross-compiling is nice, but if the build toolchain requires xcode, then it doesn't help all that much, since the last and most important step has to be done on apple hardware.
At least you can build on docker runners instead of fragile shell runners on MacOS. But any benefits are probably not worth the cost of complexity of cross compilation.