generated from CubeCraft-Creations/Tracehound
build(dev): switch to ARM64 cross-compile for Pi Zero 2 W deployment
- Rename BINARY_NAME from openclaw to remoterig - Cross-compile with GOOS=linux GOARCH=arm64 for Raspberry Pi Zero 2 W - Build React frontend at repo root (npm ci && npm run build) producing dist/ - Remove old web/ working-directory and explicit embed step (handled by go:embed) - Repository dispatch event_type unchanged: dev-build-success
This commit is contained in:
@@ -9,7 +9,7 @@ on:
|
||||
env:
|
||||
GO_VERSION: "1.23"
|
||||
NODE_VERSION: "20"
|
||||
BINARY_NAME: openclaw
|
||||
BINARY_NAME: remoterig
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -29,20 +29,13 @@ jobs:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Build React frontend
|
||||
working-directory: web
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Embed frontend into Go binary
|
||||
- name: Build Go binary (ARM64 cross-compile)
|
||||
run: |
|
||||
mkdir -p internal/web/dist
|
||||
cp -r web/dist/* internal/web/dist/
|
||||
go generate ./internal/web/...
|
||||
|
||||
- name: Build Go binary
|
||||
run: |
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
|
||||
go build -ldflags="-s -w -X main.version=${GITHUB_SHA:0:8}" \
|
||||
-o ${{ env.BINARY_NAME }} ./cmd/server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user