I have found a few other posts that show how to add a script to increment the build number with a script:
Better way of incrementing build number?
Xcode proj
Xcode includes the command line tool agvtool to increase version numbers. So you don't have to do everything manually with PListBuddy.
xcrun agvtool next-version -all
increases your build number.
xcrun agvtool new-marketing-version 2.0
sets a new user visible version number.
See the full documentation for details.