how to call PowerShell script with a GithubActions workflow?
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.