From f794fbc37a5362653acab7dd1229d743760b6daf Mon Sep 17 00:00:00 2001 From: Chaim Date: Mon, 11 May 2026 15:45:48 +0000 Subject: [PATCH] fix(ci): use Windows PowerShell 5.1 (`powershell`) instead of pwsh The self-hosted Windows runner runs as LocalSystem and only sees the machine PATH. winget-installed pwsh lands in the user PATH and is invisible to the service. Built-in Windows PowerShell 5.1 (`powershell`) handles the same syntax we use, so switch all steps to it. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f76a6ac..1fb147a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Debug — show what checkout produced - shell: pwsh + shell: powershell run: | Write-Host "CWD: $(Get-Location)" Write-Host "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE" @@ -74,7 +74,7 @@ jobs: - name: Resolve mage.exe + signtool.exe paths id: tools - shell: pwsh + shell: powershell run: | # mage.exe lives under .NET 4.8 Developer Pack. Find any installed copy. $mage = Get-ChildItem 'C:\Program Files (x86)\Microsoft SDKs\Windows' -Recurse -Filter mage.exe -ErrorAction SilentlyContinue | @@ -95,7 +95,7 @@ jobs: - name: Compute version from tag id: ver - shell: pwsh + shell: powershell run: | $tag = "${{ github.ref_name }}" if ($tag -notmatch '^v(\d+\.\d+\.\d+)$') { @@ -108,7 +108,7 @@ jobs: Write-Host "Version: $version" - name: Ensure code-signing cert in LocalMachine\My - shell: pwsh + shell: powershell env: THUMB: ${{ secrets.CODESIGN_THUMBPRINT }} PFX_B64: ${{ secrets.CODESIGN_CERT_PFX_BASE64 }} @@ -142,7 +142,7 @@ jobs: # picks it by thumbprint, the service runs as LocalSystem so the runtime # search reaches both stores. - name: Sign assemblies - shell: pwsh + shell: powershell run: | $thumb = "${{ secrets.CODESIGN_THUMBPRINT }}" & "$env:SIGNTOOL" sign /sha1 $thumb /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 ` @@ -152,7 +152,7 @@ jobs: src/OutlookAddinProtocolHandler/bin/Release/net48/OutlookAddinProtocolHandler.exe - name: Publish ClickOnce - shell: pwsh + shell: powershell run: | $version = "${{ steps.ver.outputs.version }}" $versionUscore = "${{ steps.ver.outputs.versionUscore }}" @@ -195,7 +195,7 @@ jobs: ForEach-Object { Rename-Item -LiteralPath $_.FullName -NewName ($_.Name + '.deploy') } - name: Stage protocol handler - shell: pwsh + shell: powershell run: | $stagingDir = "publish/protocol-handler" New-Item -ItemType Directory -Force -Path $stagingDir | Out-Null