Compare commits
3 Commits
6f532ef4b0
...
v0.1.3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a648be3bcb | ||
![]() |
33f7775800 | ||
![]() |
ac412bbffb |
@@ -6,26 +6,8 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-spa:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: windows
|
|
||||||
arch: amd64
|
|
||||||
ext: .exe
|
|
||||||
- os: linux
|
|
||||||
arch: amd64
|
|
||||||
ext: ""
|
|
||||||
- os: linux
|
|
||||||
arch: arm64
|
|
||||||
ext: ""
|
|
||||||
- os: linux
|
|
||||||
arch: arm
|
|
||||||
arm_version: 6
|
|
||||||
ext: ""
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -35,15 +17,52 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Install dependecies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Install Quasar CLI
|
- name: Install Quasar CLI
|
||||||
run: npm install -g @quasar/cli
|
run: |
|
||||||
|
npm cache clean --force
|
||||||
|
npm install -g @quasar/cli --force
|
||||||
|
|
||||||
- name: Build Quasar SPA
|
- name: Build Quasar SPA
|
||||||
run: quasar build
|
run: quasar build
|
||||||
|
|
||||||
|
- name: Upload SPA artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: quasar-dist
|
||||||
|
path: ./dist/spa
|
||||||
|
|
||||||
|
build-backend:
|
||||||
|
needs: build-spa
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goos: windows
|
||||||
|
arch: amd64
|
||||||
|
ext: .exe
|
||||||
|
- goos: linux
|
||||||
|
arch: amd64
|
||||||
|
ext: ""
|
||||||
|
- goos: linux
|
||||||
|
arch: arm64
|
||||||
|
ext: ""
|
||||||
|
- goos: linux
|
||||||
|
arch: arm
|
||||||
|
arm_version: 6
|
||||||
|
ext: ""
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download SPA artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: quasar-dist
|
||||||
|
path: ./dist/spa
|
||||||
|
|
||||||
- name: Ensure latest Go is installed in /data/go
|
- name: Ensure latest Go is installed in /data/go
|
||||||
run: |
|
run: |
|
||||||
export GOROOT=/data/go/go
|
export GOROOT=/data/go/go
|
||||||
@@ -54,10 +73,8 @@ jobs:
|
|||||||
|
|
||||||
if [ ! -x "$GOROOT/bin/go" ]; then
|
if [ ! -x "$GOROOT/bin/go" ]; then
|
||||||
echo "Go not found in $GOROOT, downloading latest stable..."
|
echo "Go not found in $GOROOT, downloading latest stable..."
|
||||||
|
|
||||||
GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -n1)
|
GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | head -n1)
|
||||||
echo "Latest version is $GO_VERSION"
|
echo "Latest version is $GO_VERSION"
|
||||||
|
|
||||||
mkdir -p /data/go
|
mkdir -p /data/go
|
||||||
curl -sSL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tar.gz
|
curl -sSL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tar.gz
|
||||||
tar -C /data/go -xzf /tmp/go.tar.gz
|
tar -C /data/go -xzf /tmp/go.tar.gz
|
||||||
@@ -78,7 +95,7 @@ jobs:
|
|||||||
go mod tidy -v
|
go mod tidy -v
|
||||||
go mod download
|
go mod download
|
||||||
|
|
||||||
- name: Build go backend binary
|
- name: Build Go backend binary
|
||||||
working-directory: ./backend
|
working-directory: ./backend
|
||||||
run: |
|
run: |
|
||||||
export GOROOT=/data/go/go
|
export GOROOT=/data/go/go
|
||||||
@@ -87,17 +104,17 @@ jobs:
|
|||||||
export GOMODCACHE=/data/gomodcache
|
export GOMODCACHE=/data/gomodcache
|
||||||
mkdir -p $GOCACHE $GOMODCACHE
|
mkdir -p $GOCACHE $GOMODCACHE
|
||||||
|
|
||||||
OUTPUT="../server-${{ matrix.goos }}-${{ matrix.goarch }}"
|
OUTPUT="../server-${{ matrix.goos }}-${{ matrix.arch }}${{ matrix.ext }}"
|
||||||
if [ "${{ matrix.goos }}" == "windows" ]; then
|
if [ "${{ matrix.arch }}" = "arm" ]; then
|
||||||
OUTPUT="${OUTPUT}.exe"
|
GOARM=${{ matrix.arm_version }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -trimpath -o "$OUTPUT" main.go
|
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.arch }} go build -ldflags="-s -w" -trimpath -o "$OUTPUT" main.go
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload combined package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }}
|
name: lightcontroller-${{ matrix.goos }}-${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
./dist/spa
|
./dist/spa
|
||||||
server-${{ matrix.goos }}-${{ matrix.goarch }}${{ (matrix.goos == 'windows' && '.exe') || '' }}
|
server-${{ matrix.goos }}-${{ matrix.arch }}${{ matrix.ext }}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lightcontrol",
|
"name": "lightcontrol",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"description": "A Tecamino App",
|
"description": "A Tecamino App",
|
||||||
"productName": "Light Control",
|
"productName": "Light Control",
|
||||||
"author": "A. Zuercher",
|
"author": "A. Zuercher",
|
||||||
|
Reference in New Issue
Block a user