Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
87d5d769c8 | ||
![]() |
510d2980ac | ||
![]() |
fb43c99920 | ||
![]() |
be1a06a759 | ||
![]() |
4951e2bb34 | ||
![]() |
403f35b87f | ||
![]() |
a8fb630542 |
69
.github/workflows/build.yml
vendored
Normal file
69
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
name: Build Quasar SPA and Go Backend for lightController
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
goos: [linux, windows]
|
||||||
|
goarch: [amd64, arm, arm64]
|
||||||
|
exclude:
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set ip Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependecies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build Quasar SPA
|
||||||
|
run: |
|
||||||
|
npm install -g @quasar/cli quasar build
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.24.0'
|
||||||
|
|
||||||
|
- name: Set up Git credentials for private modules
|
||||||
|
run: |
|
||||||
|
git config --global url."https://oauth2:${{ secrets.GH_PAT }}@github.com".insteadOf "https://github.com"
|
||||||
|
env:
|
||||||
|
GH_PAT_FOR_MODULES: ${{ secrets.GH_PAT }}
|
||||||
|
|
||||||
|
- name: Go Mod Tidy & Download
|
||||||
|
working-directory: ./backend
|
||||||
|
run: go mod tidy -v
|
||||||
|
|
||||||
|
- 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/tecamino-dbm-${{ 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
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: spa-and-backend
|
||||||
|
path: |
|
||||||
|
dist/spa
|
||||||
|
build/
|
Reference in New Issue
Block a user