Add artifactoryPublish check to build