Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to call PowerShell script with a GithubActions workflow?

I'm calling .\build.ps1 and it seems to hang:

https://github.com/nblockchain/ZXing.Net.Xamarin/runs/232358091

Do I need something special? In AzureDevOps this was working out of the box.

like image 963
knocte Avatar asked Sep 23 '19 11:09

knocte


1 Answers

As agreed in the comments, the solution for this issue was to specify the shell to be run in your Action file. In your case you had to change from:

    - name: Build
      run: |
        .\build.ps1

to:

    - name: Build
      shell: pwsh
      run: |
        .\build.ps1

For more details about available values for shell param, refer to documentation.

like image 119
Robert Dyjas Avatar answered Oct 02 '22 21:10

Robert Dyjas