From fcbe405e23521773ef30350f1f516755a5b61137 Mon Sep 17 00:00:00 2001 From: Developer Date: Mon, 6 Apr 2026 19:00:32 -0700 Subject: [PATCH] Fix Windows tag step: use PowerShell instead of bash The act runner on Windows doesn't have bash available. Switched back to PowerShell with the inputs.tag fallback chain. Uses Out-File for GITHUB_OUTPUT instead of echo redirection. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build-app-windows.yml | 21 +++++++++++---------- .gitea/workflows/build-sidecar-windows.yml | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/build-app-windows.yml b/.gitea/workflows/build-app-windows.yml index 8001ff9..632f527 100644 --- a/.gitea/workflows/build-app-windows.yml +++ b/.gitea/workflows/build-app-windows.yml @@ -16,17 +16,18 @@ jobs: steps: - name: Determine tag id: tag - shell: bash + shell: powershell run: | - TAG="${{ inputs.tag }}" - if [ -z "$TAG" ]; then - TAG="${{ github.event.inputs.tag }}" - fi - if [ -z "$TAG" ]; then - TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||') - fi - echo "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $GITHUB_OUTPUT + $TAG = "${{ inputs.tag }}" + if (-not $TAG) { $TAG = "${{ github.event.inputs.tag }}" } + if (-not $TAG) { + $remote = git ls-remote --tags origin 'refs/tags/v*' 2>$null + if ($remote) { + $TAG = ($remote -split "`n" | Select-Object -Last 1) -replace '.*refs/tags/', '' + } + } + Write-Host "Building for tag: $TAG" + "tag=$TAG" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append - uses: actions/checkout@v4 with: diff --git a/.gitea/workflows/build-sidecar-windows.yml b/.gitea/workflows/build-sidecar-windows.yml index 4c7cf4b..9e3e1b3 100644 --- a/.gitea/workflows/build-sidecar-windows.yml +++ b/.gitea/workflows/build-sidecar-windows.yml @@ -16,17 +16,18 @@ jobs: steps: - name: Determine tag id: tag - shell: bash + shell: powershell run: | - TAG="${{ inputs.tag }}" - if [ -z "$TAG" ]; then - TAG="${{ github.event.inputs.tag }}" - fi - if [ -z "$TAG" ]; then - TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||') - fi - echo "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $GITHUB_OUTPUT + $TAG = "${{ inputs.tag }}" + if (-not $TAG) { $TAG = "${{ github.event.inputs.tag }}" } + if (-not $TAG) { + $remote = git ls-remote --tags origin 'refs/tags/sidecar-v*' 2>$null + if ($remote) { + $TAG = ($remote -split "`n" | Select-Object -Last 1) -replace '.*refs/tags/', '' + } + } + Write-Host "Building for tag: $TAG" + "tag=$TAG" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append - uses: actions/checkout@v4 with: