tweak upload script to handle publishing