I have set environment variable in azure yaml pipeline like this
- task: PowerShell@2
inputs:
targetType: 'inline'
script: | $env:MY_VARIABLE = "$(my-value)"
$env:MY_VARIABLE >> test.txt
...
when I run the pipeline and go to published artifact in summary section of the pipeline, I can see that test.txt has correct value. Is there a way I can read this MY_VARIABLE in c# code, which is going to be run with a specflow task in this yaml pipeline