Using ENV variable as working directory?

I am trying to use a environment variable as my working directory like:

  - run:
      name: Verify the Project
      command: mvn verify

      # This works: 
      # working_directory: ./StudentWork/code/oauth2-server/solution-code
      # **** This does not work:  *****
      # working_directory: $BASE_DIR

I have tried BASE_DIR and {BASE_DIR}

And I have even run echo $BASE_DIR and the value is displayed correctly.
Why cant I use this as a working_directory ?

You might use YAML anchors and references to get what you want. Take a look at the “variables” at the top of this file (not mine):