Update deps and make publish script less error-prone