handle publish automatically (in a _dirty_ way)