cmsBuild: fix building and uploading in a single job