Improve publish script