There's a blog entry on developmentseed.org where it describes how to automate an archive build to be uploaded to TestFlight.
It doesn't include automatically updating devices in the provisioning profile, but MoProPro appears to be a command line utility to add new devices.