I suspect many people miss that the SSH key they already have can sign files. No GPG keyring needed, just ssh-keygen -Y.
Sign a file:
ssh-keygen -Y sign -f ~/.ssh/id_ed25519 -n file release.tar.gz
That writes release.tar.gz.sig. The -n value is a namespace, a label that keeps a signature for one purpose from being reused for another. Use the same one when verifying.
The verifier needs an allowed signers file: an identity, then the public key, one per line.
[email protected] ssh-ed25519 AAAAC3Nza...
Then:
ssh-keygen -Y verify -f allowed_signers -I [email protected] \
-n file -s release.tar.gz.sig < release.tar.gz
It prints Good "file" signature for [email protected] and exits with 0, so it works in scripts too. Note the file to check comes in on standard input.
The weak spot is the allowed signers file. A signature only proves something if you got that public key through a channel you trust, so do not download it from the same place as the file it is supposed to vouch for.
Further reading: ssh-keygen man page