In Unity 5.3, there is the PostProcessBuildAttribute. "Add this attribute to a method to get a notification just after building the player." (Source: UnityEditor.Callbacks.PostProcessBuildAttribute documentation.)
Using that attribute, you should be able to set up something like:
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
CreateBuildTimestampFile(pathToBuiltProject);
}
private static void CreateBuildTimestampFile(string pathToBuiltProject)
{
string directory = Path.GetDirectoryName(pathToBuiltProject);
string timestampFile = Path.Combine(directory, "timestamp.txt");
if (File.Exists(timestampFile))
{
File.Delete(timestampFile);
}
using (var streamWriter = File.CreateText(timestampFile))
{
var timestamp = System.DateTime.UtcNow.ToString(CultureInfo.InvariantCulture);
streamWriter.WriteLine(timestamp);
}
}
As a side note, you may find the Unity 5.3 Build Player Pipeline documentation page useful as well.