On android studio you can create the sign key and sign the apk i suggest you to read this documentation carefully this should to be done in a proper way to avoid exposing your key if someone disasanbles the apk.
In another way submiting to fdroid they sign the apk with a fdroid key for another other foss repositories i dont known how they works