From b7e3fa435a19ebd63b93af29b6a5441ea58a75d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Thu, 29 May 2025 10:40:13 +0200 Subject: [PATCH] fix artifacts and go.mod go sum with AI --- .github/workflows/build.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 514853c..35112e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set ip Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '20' @@ -36,7 +36,7 @@ jobs: npm install -g @quasar/cli quasar build - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.24.0' @@ -46,6 +46,16 @@ jobs: env: GH_PAT_FOR_MODULES: ${{ secrets.GH_PAT }} + - name: Restore Go module cache + uses: actions/cache@v4 + with: + path: | + ~/go/pkg/mod + ~/.cache/go-build # Optional, but good for build cache + key: ${{ runner.os }}-${{ matrix.goos }}-${{ matrix.goarch }}-go-${{ hashFiles('backend/go.sum') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.goos }}-${{ matrix.goarch }}-go- + - name: Go Mod Tidy & Download working-directory: ./backend run: go mod tidy -v @@ -55,15 +65,15 @@ jobs: run: | mkdir -p build if [ "${{ matrix.goos }}" == "windows" ]; then - GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/tecamino-dbm-${{ matrix.goos }}-${{ matrix.goarch }}.exe main.go + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/server-${{ matrix.goos }}-${{ matrix.goarch }}.exe main.go else - GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/tecamino-dbm-${{ matrix.goos }}-${{ matrix.goarch }} main.go + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o build/server-${{ matrix.goos }}-${{ matrix.goarch }} main.go fi - name: Upload build artifacts uses: actions/upload-artifact@v4 with: - name: spa-and-backend + name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }} path: | - dist/spa - build/ + ./dist/spa + ./backend/build/