Build: Generate pre-releases the same way as stable releases

Fixes #9998