Merged template of publish task and fixed Travis script