Pushed release steps to Gradle so that it's easier to make it conditional.
Release will only be activated for master branch and will be off for pull requests.