brew install gpg
# generate gpg key
gpg --gen-key
# list keys
gpg --list-secret-keys
# export public key
# then add it to your github account
gpg --armor --export your_email@example.com
# telling git about you gpg key
git config --global user.signingkey KEY_ID
# how to sin you commit
git commit -S -m 'something'
# sigh tag
git tag -s 'v1.0'