upload: extract upload_dist(), which contains just the logic needed to upload a package