publish: add some callbacks

generated from commit eacbb34f5446e36174ef2a291bcc588ac1f8517c