I have a github actions runner running on my win10 machine, it is running in command prompt. I have a basic github actions workflow here:
name: Release New NuGet Package Test
on:
workflow_dispatch:
inputs:
nugetPkgProjectName:
description: 'Enter your NuGet Package Project Name:'
required: true
type: string
incrementMinorVersion:
description: 'Set to "true" if you want to increment minor and set patch to zero.'
required: false
type: string
descriptionVar:
description: 'What changes were made in this version?'
required: false
type: string
jobs:
begin:
runs-on: martin-laptop
steps:
- uses: actions/checkout@v3
with:
sparse-checkout: |
Martin Nuget Work
- name: Extract Branch and Commit
run: |
echo "Branch = ${{ github.ref_name }}"
echo "Commit = ${{ github.sha }}"
- name: Determine NuGet Package Version
id: run-ps-script
shell: pwsh
run: |
Write-Host "here is some pwsh stuff"
Write-Host "cool env var : $env:GITHUB_ACTION_PATH/Martin Nuget Work"
When I trigger this workflow in github actions, it fails at the last step 'Determine NuGet Package Version' with this error:
Run Write-Host "here is some pwsh stuff"
Write-Host "here is some pwsh stuff"
Write-Host "cool env var : $env:GITHUB_ACTION_PATH/Martin Nuget Work"
Error: pwsh: command not found
This has worked fine in the past, but now on this new machine, a pwsh shell command never passes, is it an issue with my runner?
martin-laptophaspwshinstalled (can you typepwshlocally from your command line)pwsheither through defaults or on your specific step.https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
Ex: