Refactored publishing in Build.scala