9 Commits

Author SHA1 Message Date
Adrian Zürcher
c4fe532e88 add workingdir for go setup and conditional executable on backend 2025-05-29 11:22:07 +02:00
Adrian Zürcher
838ac4e7c3 add new step seperate uasar cli and quasar build 2025-05-29 10:56:28 +02:00
Adrian Zürcher
b7e3fa435a fix artifacts and go.mod go sum with AI 2025-05-29 10:40:13 +02:00
Adrian Zürcher
87d5d769c8 change artifact output 2025-05-29 10:27:05 +02:00
zuadi
510d2980ac fix secret name 2025-05-29 10:20:14 +02:00
zuadi
fb43c99920 add missing working directory for go mod 2025-05-29 10:08:46 +02:00
zuadi
be1a06a759 change git credential section 2025-05-29 10:05:45 +02:00
Adrian Zürcher
4951e2bb34 fix artifact tag to @4 2025-05-29 09:46:38 +02:00
Adrian Zürcher
403f35b87f fix wrong tabs to spaces 2025-05-29 09:45:02 +02:00

View File

@@ -21,44 +21,61 @@ 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'
- name: Install dependecies
run: npm install
- name: Build Quasar SPA
run: |
npm install -g @quasar/cli quasar build
- name: Install Quasar CLI
run: npm install -g @quasar/cli
- name: Build Quasar SPA
run: quasar build
- name: Set up Go
uses: actions/setup-go@v4
working-directory: ./backend
uses: actions/setup-go@v5
with:
go-version: '1.24.0'
- name: Set up Git credentials for private modules
run: |
git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/"
echo "GOPRIVATE=github.com/tecamino/*" >> $GITHUB_ENV
git config --global url."https://oauth2:${{ secrets.GH_PAT }}@github.com".insteadOf "https://github.com"
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
- 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
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/tecamino-dbm-${{ 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
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.goos }}-${{ matrix.goarch }}
name: lightcontroller-${{ matrix.goos }}-${{ matrix.goarch }}
path: |
dist/spa
backend/server
./dist/spa
server-${{ matrix.goos }}-${{ matrix.goarch }}${{ (matrix.goos == 'windows' && '.exe') || '' }}