Fix build logic in Jenkinsfile
Fix build logic in Jenkinsfile

We should only run publishing step when building a release branch.
Basic checking should be performed on all branches at all times.

realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core