Variables in the Build test

Hello,
I have to declare a variable in my yml file.
The variable name is my.env how can I declare it in my yml file?
I tried all the possible options.

variables:
my:
env: “dev”

variables:
my.env: “dev”

Nothing is working… can you please support?