Add pre-publish hook.