Optimize travis build with publish option