Support for travis-ci.org to deploy to sonatype
Instructions start assuming that you are able to build & deploy by yourself.
> gpg2 --gen-key
> gpg2 --list-secret-keys
sec 2048R/0F8B00C7 2015-10-20
uid SCR Travis Deployment (Sheridan Rawlins Travis Deployment) <sheridan.rawlins+travis@yahoo.com>
ssb 2048R/6A238AB5 2015-10-20
# In this case, the hash is 0F8B00C7
> mkdir travis
> cd travis
> curl -O https://raw.githubusercontent.com/scr/travis-deploy-sonatype/master/travis/settings.xml
See http://docs.travis-ci.com/user/encryption-keys/
> sudo gem install travis # if you haven't already
> travis encrypt SONATYPE_USER=your-sonatype-username --add
> travis encrypt SONATYPE_PASSWD=your-sonatype-passwd --add
> travis encrypt GPG_USER=the-hash-from-above --add
> travis encrypt GPG_PASSWD=the-password-from-above --add
See http://docs.travis-ci.com/user/encrypting-files/
> gpg2 -a --export-secret-keys the-hash-from-above > somename.asc
> travis encrypt-file somename.asc
# You'll see output like the following - In this example "0a6446eb3ae3" is the ENC_HASH you will use later
openssl aes-256-cbc -K $encrypted_0a6446eb3ae3_key -iv $encrypted_0a6446eb3ae3_key -in super_secret.txt.enc -out super_secret.txt -d
cd .. # Back to your project root - out of the travis subfolder
git submodule add https://github.com/scr/travis-deploy-sonatype.git
after_success:
- bash travis-deploy-sonatype/scripts/deploy.sh the-ENC_HASH-from-above travis/somename-from-above.asc.enc travis/settings.xml
sudo: true