moved publishing script to a separate file