So, one option is create a file during the build with all the build variables and attach it as an artifact to the build.
Not a big deal, but I am wondering if this is the natural way to do it in Azure DevOps. Maybe there is some feature to enable it easily and I just do not see it?