"dist-upload" scan .cabal file under current directory to get packageName/packageVersion (foo.x.y.z), and use command:
cabal sdist && cabal upload ./dist/foo.x.y.z.tar.gz
upload package to hackage, best use command "dist-upload" in script to upload package batch.
If you have add hackage username/password in file
HOME/.cabal/config, then "dist-upload" can upload package fully automatic. :)