Fix Windows tag step: use PowerShell instead of bash
All checks were successful
Release / Bump version and tag (push) Successful in 4s
All checks were successful
Release / Bump version and tag (push) Successful in 4s
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) <noreply@anthropic.com>
This commit is contained in:
@@ -16,17 +16,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Determine tag
|
- name: Determine tag
|
||||||
id: tag
|
id: tag
|
||||||
shell: bash
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ inputs.tag }}"
|
$TAG = "${{ inputs.tag }}"
|
||||||
if [ -z "$TAG" ]; then
|
if (-not $TAG) { $TAG = "${{ github.event.inputs.tag }}" }
|
||||||
TAG="${{ github.event.inputs.tag }}"
|
if (-not $TAG) {
|
||||||
fi
|
$remote = git ls-remote --tags origin 'refs/tags/v*' 2>$null
|
||||||
if [ -z "$TAG" ]; then
|
if ($remote) {
|
||||||
TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||')
|
$TAG = ($remote -split "`n" | Select-Object -Last 1) -replace '.*refs/tags/', ''
|
||||||
fi
|
}
|
||||||
echo "Building for tag: ${TAG}"
|
}
|
||||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
Write-Host "Building for tag: $TAG"
|
||||||
|
"tag=$TAG" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -16,17 +16,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Determine tag
|
- name: Determine tag
|
||||||
id: tag
|
id: tag
|
||||||
shell: bash
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
TAG="${{ inputs.tag }}"
|
$TAG = "${{ inputs.tag }}"
|
||||||
if [ -z "$TAG" ]; then
|
if (-not $TAG) { $TAG = "${{ github.event.inputs.tag }}" }
|
||||||
TAG="${{ github.event.inputs.tag }}"
|
if (-not $TAG) {
|
||||||
fi
|
$remote = git ls-remote --tags origin 'refs/tags/sidecar-v*' 2>$null
|
||||||
if [ -z "$TAG" ]; then
|
if ($remote) {
|
||||||
TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||')
|
$TAG = ($remote -split "`n" | Select-Object -Last 1) -replace '.*refs/tags/', ''
|
||||||
fi
|
}
|
||||||
echo "Building for tag: ${TAG}"
|
}
|
||||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
Write-Host "Building for tag: $TAG"
|
||||||
|
"tag=$TAG" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user