I have another thing that confuses me: It seems Actions uses PowerShell Core and not the default Desktop PowerShell.
My workflow action:
name: Build (Windows) on: [deployment] jobs: build-win: runs-on: windows-latest if: github.event.deployment.environment == 'win' steps: - name: Checkout uses: actions/checkout@v1 - name: Build run: $PSVersionTable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel ----- ----- ----- --------------- ---------- 6 2 3
As far as i know this refers to PoweShell 6, which is PowerShell Core.
The default PowerShell on Windows Server 2019 is PowerShell 5.1.
The documentation says:
This is the default shell used on Windows. The Desktop PowerShell. GitHub appends the extension .ps1 to your script name.
This seems like a bug.