Skip to content

Update dependency com.android.tools.build:gradle to v9 #861

Update dependency com.android.tools.build:gradle to v9

Update dependency com.android.tools.build:gradle to v9 #861

Workflow file for this run

name: Build Bundle (Frontend + Backend)
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
jobs:
build-bundle:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '24.x'
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26'
cache-dependency-path: backend-go/go.sum
- name: Cache npm dependencies
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-20-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-20-
- name: Cache Go modules
uses: actions/cache@v5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('backend-go/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install frontend dependencies
run: npm ci
- name: Build frontend
run: npm run build
- name: Prepare build directories
run: |
rm -rf dist-backend
mkdir -p dist-backend
rm -rf backend-go/internal/static/dist
mkdir -p backend-go/internal/static/dist
- name: Copy frontend to backend static folder
run: |
cp -r dist/* backend-go/internal/static/dist/
- name: Install backend dependencies
working-directory: backend-go
run: |
go mod download
go mod tidy
- name: Run backend tests
working-directory: backend-go
run: go test -v ./...
- name: Build for Linux AMD64 with embedded frontend
working-directory: backend-go
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
run: |
go build -tags=bundle -ldflags="-s -w" -o ../dist-backend/bar-pi-bundle-linux-amd64 ./cmd/server/main.go
- name: Build for Linux ARM64 with embedded frontend
working-directory: backend-go
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0
run: |
go build -tags=bundle -ldflags="-s -w" -o ../dist-backend/bar-pi-bundle-linux-arm64 ./cmd/server/main.go
- name: Build for Linux ARM with embedded frontend
working-directory: backend-go
env:
GOOS: linux
GOARCH: arm
GOARM: 7
CGO_ENABLED: 0
run: |
go build -tags=bundle -ldflags="-s -w" -o ../dist-backend/bar-pi-bundle-linux-arm ./cmd/server/main.go
- name: Clean up embedded frontend
run: rm -rf backend-go/internal/static/dist
- name: Upload bundle artifacts
uses: actions/upload-artifact@v7
with:
name: bundle-binaries
path: dist-backend/
retention-days: 30