I have a pipeline in Azure, that is triggered when a commit or merge is done in master branch.
This pipeline builds the project, sign the app and release a new version to App Center.
How can I do to create a new tag in the repo, associated with that release version and that branch?
Sorry we do not have any build-in feature or official task to support this currently.
You could take a look at this 3rd-party extension--Tag\Branch Git on Release which fit your needs:
This is an Azure DevOps plugin that will git tag or branch artifact source code with the release name. This makes it very easy to patch in the future if needed.
When the task runs it finds all linked artifacts that originated from a TfsGit source repo and tags or branches them with the release name. This is meant to be super simple. Just drop in your release pipeline and go.