generated from CubeCraft-Creations/Tracehound
a1456fe741
The build-dev publish step failed with exit 127 — the act runner image is minimal (no curl, jq, or sudo; runs as root). Node is always present (setup-node), so do the release publish in Node using built-in fetch/crypto and FormData/Blob for the asset upload. No external tools needed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Build (Dev)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
GO_VERSION: "1.25"
|
|
NODE_VERSION: "22"
|
|
BINARY_NAME: remoterig
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Build React frontend
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Build Go binary (ARM64 cross-compile)
|
|
run: |
|
|
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
|
|
|
|
# Pull-based deploy: publish the binary to a rolling "dev" release.
|
|
# The Pi polls this release and self-updates (scripts/pi-update.sh);
|
|
# the runner never needs to reach the closed RemoteRig network.
|
|
# Done in Node (runner image has no curl/jq/sudo; Node is present).
|
|
- name: Publish to rolling dev release
|
|
env:
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SERVER: ${{ github.server_url }}
|
|
REPO: ${{ github.repository }}
|
|
SHA: ${{ github.sha }}
|
|
run: node .gitea/scripts/publish-release.mjs |