Build your App into an .app file with a “Release” schema:
xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Release
Package your App as an .ipa:
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}”
Then, run Application Loader (Download/Install Application Loader 2.9 if necessary):
open -a /Developer/Applications/Utilities/Application\ Loader.app
-
After it opens select “Next”

-
Enter your iTunes Connect Apple ID and Password and select “Next”

-
After your authenticated select “Next”

-
Select your App and click “Next”

-
Confirm App compatability

-
“Choose” the binary file to upload

-
Select and click “Next”

-
Start the upload by clicking “Send”
-
It will will take a few moments to authenticate through the iTunes Store

-
Once complete, your app package has been uploaded to the iTunes Store. Click “Next”

-
You are “Done”!

-
Your App will show a Status of “Upload Received”

Links:
Apple Doc – Using Application Loader
automating-over-the-air-deployment-for-iphone
How To Upload Your App To iTunes Connect Using Application Loader