I'm building an Android apk using Github actions, and I need to use the Android sign key in order to sign it before releasing it.
To do so I'm using the technic described here with GPG to encrypt the release key as base64 string, and use it as a secret in Github actions.
Then, inside my workflow, I use GPG to decrypt it back into the key file.
However, this process that works fine on my mac, is failing in Github actions.
Running this
- name: Decode keystore file
run: |
echo "${{ secrets.KEY_STORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.KEY_STORE_PASSPHRASE }}" --batch release.keystore.asc > signing-key.jks
results in this
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: no valid OpenPGP data found.
gpg: decrypt_message failed: Unknown system error
##[error]Process completed with exit code 2.
Running sudo apt-get install ca-certificates
before using GPG is at no help either, since it says that it's already installed.
Any ideas?