we have configured a build to check Git for changes on master (configured as default branch) and pull requests. This works quite well.
What we would like to do now is having a dependent build that runs when the first build successfully build the master branch (and ignoring successful builds on the pull-request builds). And preferably using the same commit hash from it.
The second build will be used to publish artifacts - therefore we want to make sure we only start if the preconditions are ok (first build ok on master) and that we use the exact same version from git.
Is there a way to achieve this in TeamCity somehow?