Added upload functionality to publish.py