Skip to content

Commit 4a093a1

Browse files
fix: Use env block for cross-platform build in release workflow
The bash-style environment variable prefix doesn't work on Windows (PowerShell). Using the env block ensures compatibility across all platforms.
1 parent af20eee commit 4a093a1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ jobs:
4444
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
4545

4646
- name: Build binary
47-
run: |
48-
CGO_ENABLED=0 GOOS=${{ matrix.os == 'windows-latest' && 'windows' || (matrix.os == 'macos-latest' && 'darwin' || 'linux') }} GOARCH=amd64 go build -o arbor-${{ steps.version.outputs.VERSION }}-${{ matrix.artifact_suffix }} ./cmd/arbor
47+
env:
48+
CGO_ENABLED: 0
49+
GOOS: ${{ matrix.os == 'windows-latest' && 'windows' || (matrix.os == 'macos-latest' && 'darwin' || 'linux') }}
50+
GOARCH: amd64
51+
run: go build -o arbor-${{ steps.version.outputs.VERSION }}-${{ matrix.artifact_suffix }} ./cmd/arbor
4952

5053
- name: Create archive
5154
if: matrix.zip_extension == 'tar.gz'

0 commit comments

Comments
 (0)