Files
Nexus-Guard-Suite/.gitea/workflows/build_device_agent.yaml
T
datadunia 5b5a4aa009
CI / server-core-test (push) Failing after 18s
CI / device-agent-test (push) Failing after 14s
CI / dashboard-test (push) Failing after 15s
CI / build-server-core (push) Has been skipped
CI / build-device-agent (push) Has been skipped
CI / build-dashboard (push) Has been skipped
CI / build-docs (push) Has been skipped
CI / release (push) Has been skipped
ci: add BUILD_TOKEN for submodule checkout authentication
2026-06-10 04:26:22 +07:00

46 lines
1.1 KiB
YAML

name: Build Device Agent
on:
workflow_call:
jobs:
cross-build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
defaults:
run:
working-directory: apps/device-agent
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
token: ${{ secrets.BUILD_TOKEN }}
persist-credentials: true
- uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: Build
env:
CGO_ENABLED: '0'
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
EXT=""
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
go build -o bin/nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nexus-device-agent-${{ matrix.goos }}-${{ matrix.goarch }}
path: apps/device-agent/bin/nexus-device-agent-*