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