I have a release pipeline in Azure Devops. In the release pipeline I have a bash script -step that references the variable $(Release.Artifacts.MyCustomAlias.BuildNumber). In the script I echo the value of the variable.
Now I created a new release and selected the build 20200820.22 as the artifact.
When checking the output of the script it is using the value 20200821.2, which is the latest build, but not the one I selected.
How can I access the correct build version from the release script?