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:
2026-05-21 21:38:39 +00:00
parent 607aea514b
commit a90a1d567e
+3 -10
View File
@@ -9,7 +9,7 @@ on:
env: env:
GO_VERSION: "1.23" GO_VERSION: "1.23"
NODE_VERSION: "20" NODE_VERSION: "20"
BINARY_NAME: openclaw BINARY_NAME: remoterig
jobs: jobs:
build: build:
@@ -29,20 +29,13 @@ jobs:
node-version: ${{ env.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
- name: Build React frontend - name: Build React frontend
working-directory: web
run: | run: |
npm ci npm ci
npm run build npm run build
- name: Embed frontend into Go binary - name: Build Go binary (ARM64 cross-compile)
run: | run: |
mkdir -p internal/web/dist CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
cp -r web/dist/* internal/web/dist/
go generate ./internal/web/...
- name: Build Go binary
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags="-s -w -X main.version=${GITHUB_SHA:0:8}" \ go build -ldflags="-s -w -X main.version=${GITHUB_SHA:0:8}" \
-o ${{ env.BINARY_NAME }} ./cmd/server -o ${{ env.BINARY_NAME }} ./cmd/server