refactor(tasks): refactor publish tasks

related to #CAM-2703