How to execute a .cmd file using Visual Studio Developer Command prompt in Github actions?

We are having a .cmd script file which i want to run using visual studio developer command prompt inside the github actions, is it possible ?

If yes, then can you guys help with the syntax that i have to provide in the workflow yaml file?

Hi @ankitkaushaltr ,

Checked the VS Develper Command prompt execution path, please try with below code:

jobs:
  job1:
    runs-on: [Windows-latest]
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: shellcheck
        shell: cmd
        run: |
          call "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools\Developer Command Prompt for VS 2019.lnk"
          call ${{ github.workspace}}\test.cmd

Thanks

1 Like