From c4fe532e88cc3f0d4eac4163d02589f8e131118d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Thu, 29 May 2025 11:22:07 +0200 Subject: [PATCH] add workingdir for go setup and conditional executable on backend --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1648cbe..04f8d31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,7 @@ jobs: run: quasar build - name: Set up Go + working-directory: ./backend uses: actions/setup-go@v5 with: go-version: '1.24.0' @@ -65,11 +66,10 @@ jobs: - name: Build go backend binary working-directory: ./backend run: | - mkdir -p build if [ "${{ matrix.goos }}" == "windows" ]; then - GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/server-${{ matrix.goos }}-${{ matrix.goarch }}.exe main.go + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ../server-${{ matrix.goos }}-${{ matrix.goarch }}.exe main.go else - GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/server-${{ matrix.goos }}-${{ matrix.goarch }} main.go + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ../server-${{ matrix.goos }}-${{ matrix.goarch }} main.go fi - name: Upload build artifacts @@ -78,4 +78,4 @@ jobs: name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }} path: | ./dist/spa - ./backend/build/ + server-${{ matrix.goos }}-${{ matrix.goarch }}${{ (matrix.goos == 'windows' && '.exe') || '' }}