Builds, runs tests and publishes snapshot