Skip to content

Instantly share code, notes, and snippets.

@garethahealy
Created April 4, 2017 08:43
Show Gist options
  • Save garethahealy/8fcf11c2318735b846fbf32abf8b4fee to your computer and use it in GitHub Desktop.
Save garethahealy/8fcf11c2318735b846fbf32abf8b4fee to your computer and use it in GitHub Desktop.
travis-encrypt
#!/usr/bin/env bash
## Replace {} with values
travis login --user {travis login - i use github} --github-token={token which you can get some the settings page}
gpg --export --armor {key email} > ./.travis/codesigning.asc
gpg --export-secret-keys --armor {key email} >> ./.travis/codesigning.asc
cd ./.travis || exit
travis encrypt-file codesigning.asc --add
rm -f codesigning.asc
travis encrypt SONATYPE_USERNAME={username for sonatype} --add
travis encrypt SONATYPE_PASSWORD={password for sonatype} --add
travis encrypt GPG_KEY_NAME={email for signing key} --add
travis encrypt GPG_PASSPHRASE={passphrase for signing key} --add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment