Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2e869d1d09 | ||
![]() |
c4fe532e88 | ||
![]() |
838ac4e7c3 |
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -31,14 +31,17 @@ jobs:
|
|||||||
- name: Install dependecies
|
- name: Install dependecies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Build Quasar SPA
|
- name: Install Quasar CLI
|
||||||
run: |
|
run: npm install -g @quasar/cli
|
||||||
npm install -g @quasar/cli quasar build
|
|
||||||
|
|
||||||
|
- name: Build Quasar SPA
|
||||||
|
run: quasar build
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.24.0'
|
go-version: '1.24.0'
|
||||||
|
cache-dependency-path: backend/go.sum
|
||||||
|
|
||||||
- name: Set up Git credentials for private modules
|
- name: Set up Git credentials for private modules
|
||||||
run: |
|
run: |
|
||||||
@@ -46,16 +49,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_PAT_FOR_MODULES: ${{ secrets.GH_PAT }}
|
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
|
- name: Go Mod Tidy & Download
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
run: go mod tidy -v
|
run: go mod tidy -v
|
||||||
@@ -63,11 +56,10 @@ jobs:
|
|||||||
- name: Build go backend binary
|
- name: Build go backend binary
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
|
||||||
if [ "${{ matrix.goos }}" == "windows" ]; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
@@ -76,4 +68,4 @@ jobs:
|
|||||||
name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }}
|
name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }}
|
||||||
path: |
|
path: |
|
||||||
./dist/spa
|
./dist/spa
|
||||||
./backend/build/
|
server-${{ matrix.goos }}-${{ matrix.goarch }}${{ (matrix.goos == 'windows' && '.exe') || '' }}
|
||||||
|
Reference in New Issue
Block a user