Travis CI is preconfigured to publish from artifacts automatically for you. Whenever you push code to master, Travis CI will automatically build the artifacts (.jar, java doc, etc.), sign them and upload them to OSS Sonatype. This means, you have to do nothing special on your machine to publish a new version of TikXml, Travis CI will do all the hard work for you.
However, there are two kind of releases:
- SNAPSHOT release
- Stable release
All you have to do is to set VERSION_NAME=x.y.z-SNAPSHOT
in gradle.properties
and push it to master and a SNAPSHOT will be released automatically. No further action is required.
Having the SNAPSHOT suffix should be the default value for master branch unless you would like to publish a stable release.
If you would like to release a stable version you have to do the following:
- Remove the SNAPSHOT suffix in
gradle.properties
such that VERSION_NAME looks like thisVERSION_NAME=x.y.z
- Commit and push this change to master.
- Travis CI will automatically build the artifacts and upload them to OSS Sonatype.
- Log into OSS Sonatype with the tickaroo credentials (ask Hannes in case you don't know them).
- Click to on the
Staging Repositories
link on the left (inside the Build Promotion block). - Scroll down the list until the end. There should be a
comtickaroo xyz
entry. Click on it - Check the checkbox in front of
comtickaroo xyz
and the click theClose
button (on top of the screen). - Wait some time (you may have to press the
refresh button
). - If everything went well, then press
Release
button and Stable release will be released to Maven Central
That's it.