improve 'publish' task