Add base code for publish