Add prepublish hook.