Are you sure? Currently Android build depends on keystore.properties file. This file holds key store location, key alias and passwords. It is not checked into source control. Release build will fail if gradle can’t find this file.
Turns out that sed command is unnecessary. The first response linsui posted was indeed correct: You don’t need to remove signing config yourself, F-Droid tooling handles that. Just make sure your build doesn’t outright crash if it can’t find key.properties file.