Encrypted file not decrypted during build



I’m trying to scratch my head but I’m not seeing where I am wrong, I am really sorry to bother you all but I really need help.

I have a .gpg file that I need to sign my releases. Of course I don’t want to publish it so I followed TravisCI page to encrypt files. As you can see in the .travis.yml the travis gem successfully added the lines to decypt the private keyring and added in the repo’s settings the keys needed to decrypt it (I can see them in the settings menu).
Problems is, the command to decrypt it never creates the output file.

I setted up a little output lines to see what’s wrong in the build.gradle.kts which always says that the file ~/secret.gpg is never created.

EDIT: After so many attempts the Travis gem is not setting up anymore correctly the keys on my account and I have no idea why again.:confounded:

Where am I wrong?


In https://github.com/lamba92/KCoroutineWorker/blob/f8877ef87072caed4b84ac88c350f6885f0036b8/.travis.yml, you are defining before_install at the top level (lines 42-45), but it is overridden by each of the defined jobs (lines 5-7, 12-13, 18-19). So none of them runs the top-level one.


That’s it. Thank you :slight_smile: Is there a more elegant way to define a common task for multiple jobs in the matrix instead of copy-pasting stuff? How you’d rewrite this?


I would not. I don’t think YAML offers a means of concatenating arrays (see, for example, https://stackoverflow.com/questions/24090177/how-to-merge-yaml-arrays), so this is the best I can think of.