あなたはほとんどそこにいますが、あなたの構文は少しずれています. マニュアルページによると:
xcodebuild -workspace ワークスペース名 -scheme スキーム名 [-configuration 構成名] [-sdk [sdkfullpath | sdkname]] [buildaction ...] [setting=value ...] [-userdefault=value ...]
buildaction は次のいずれかです。
buildaction ... ターゲットで実行するビルド アクション (複数可) を指定します。利用可能なビルド アクションは次のとおりです。
build Build the target in the build root (SYMROOT). This is the default build action.
archive Archive a scheme from the build root (SYMROOT). This requires specifying a scheme.
test Test a scheme from the build root (SYMROOT). This requires specifying a scheme.
installsrc Copy the source of the project to the source root (SRCROOT).
install Build the target and install it into the target's installation directory in the dis-
tribution root (DSTROOT).
clean Remove build products and intermediate files from the build root (SYMROOT).
Xcode IDE では、[製品] メニューから実行する buildaction を選択するか、IDE の左上にある丸いボタンをクリックして押したままにします (実行 = 三角形の再生、テスト = レンチ アイコンなど)。
また、xcodebuild がビルド スキームを探す場所に注意してください。作成したファイルに応じて、.xcproj ファイルまたは .xcworkspace ファイルのいずれかになります。(ワークスペースを手動で作成しなかった場合は、.xcproj ファイルが作成されます)。
また、Xcode の [スキームの管理] 設定を使用して、所有しているスキームを確認することもできます。