Trying to get vcvarsall.bat to "stick"

I’m attempting to get a simple CI action setup for my C language repo on Windows. I have a simple .bat file that assumes cl.exe is accessible, since my normal workflow is to open a new cmd/powershell window, call the vcvars batch file, and then call my build.bat file.

I can successfully call the vcvars batch file, but it seems that it doesn’t stick around because calling my batch file immediately fails with:

'cl' is not recognized as an internal or external command

Linked below is my example yml:

I figured it out. I needed to use the cmd shell and call the batch file like so:

        shell: cmd
        run: |
          call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
          ./build.bat