before_script: cd numbers
language: java
jdk: oraclejdk8
after_success:
  - echo "<settings><servers><server><id>ossrh</id><username>\${env.OSSRH_USERNAME}</username><password>\${env.OSSRH_PASSWORD}</password></server></servers></settings>" > ~/settings.xml
  - mvn deploy --settings ~/settings.xml

before_script: cd numbers
language: java
jdk: oraclejdk8
before_install:
  - echo "<settings><servers><server><id>ossrh</id><username>\${env.OSSRH_USERNAME}</username><password>\${env.OSSRH_PASSWORD}</password></server></servers><properties><gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable><gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase></properties></settings>" > ~/settings.xml
  - echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import
  - echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust
deploy:
  - mvn deploy --settings ~/settings.xml

Refactor Travis script to enable GPG signature
Refactor Travis script to enable GPG signature