Unity3d build pipeline is a very handy UnityEditor.BuildPipeline class that provides you with access to build your Unity3d game to any platforms available through Build Settings.
With the Unity3d build pipeline you can actually expose methods to external scripts to automate the build process from any type of script, this can also be used in conjunction with continuous integration to automate the Unity Build process upon successful code check ins from source control.
The project demonstrated in this video can be downloaded or cloned from: