From 01b93a891ab60f158c92dab0fd826da6dc48d73c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 2 Apr 2026 09:28:57 +0900 Subject: [PATCH] Use pwsh instead of powershell https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#defaultsrunshell > This is the default shell used on Windows. The PowerShell Core. GitHub appends the extension .ps1 to your script name. If your self-hosted Windows runner does not have PowerShell Core installed, then PowerShell Desktop is used instead. Fixes #1653 --- CHANGELOG.md | 2 ++ action.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f26aa31..0defa832 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +- Fix a regression that caused an execution policy violation on self-hosted Windows runner due to use of non-default `powershell` shell, introduced in 2.71.0. + - Update `dprint@latest` to 0.53.2. ## [2.71.0] - 2026-04-01 diff --git a/action.yml b/action.yml index e2bf5187..621f3429 100644 --- a/action.yml +++ b/action.yml @@ -58,7 +58,7 @@ runs: Set-StrictMode -Version Latest $action_path = $env:GITHUB_ACTION_PATH & bash --noprofile --norc "${action_path}/main.sh" - shell: powershell + shell: pwsh env: # NB: Sync with non-Windows case. INPUT_TOOL: ${{ inputs.tool }}