diff --git a/.travis.yml b/.travis.yml
index 59da017..c05afd5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,11 +15,21 @@ before_install:
fi
install:
- - mvn install -DskipTests=true -B -V -Psign -Dgpg.passphrase=$GPG_PASSPHRASE
+ - mvn deploy -B -V -DskipTests -Dgpg.passphrase=$GPG_PASSPHRASE -Psign --settings settings.xml
script:
- mvn test -B
+after_success:
+ - if [ -n "$TRAVIS_TAG" ]; then
+ mvn nexus-staging:release --settings settings.xml;
+ fi
+
+after_failure:
+ - if [ -n "$TRAVIS_TAG" ]; then
+ mvn nexus-staging:drop --settings settings.xml;
+ fi
+
deploy:
provider: releases
api_key:
diff --git a/pom.xml b/pom.xml
index 5fa3688..8e47486 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,6 +35,17 @@
scm:git:git@github.com:juliaaano/payload.git
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
1.8
1.8
@@ -185,6 +196,17 @@
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.8
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+
+
+
diff --git a/settings.xml b/settings.xml
new file mode 100644
index 0000000..eea69d7
--- /dev/null
+++ b/settings.xml
@@ -0,0 +1,12 @@
+
+
+
+ ossrh
+ ${env.OSSRH_USERNAME}
+ ${env.OSSRH_PASSWORD}
+
+
+