ci: multi-OS agent binary build
Some checks failed
Build Agent Binaries / build (macos-latest) (push) Failing after 1s
Build Agent Binaries / build (ubuntu-latest) (push) Failing after 21s
Build Agent Binaries / build (windows-latest) (push) Has been cancelled

This commit is contained in:
Hermes
2026-10-01 16:05:09 -07:00
parent 43e5d0b7d8
commit 233f5c21e5

View File

@@ -0,0 +1,41 @@
name: Build Agent Binaries
on:
push:
paths: ['agents/agent.py', '.gitea/workflows/build-binaries.yml']
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install PyInstaller (unix)
if: matrix.os != 'windows-latest'
run: pip install pyinstaller
- name: Install PyInstaller (windows)
if: matrix.os == 'windows-latest'
run: pip install pyinstaller
- name: Bake token + build (unix)
if: matrix.os != 'windows-latest'
shell: bash
env:
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
run: |
sed "s/__AGENT_TOKEN__/$AGENT_TOKEN/" agents/agent.py > baked.py
pyinstaller --onefile --name NexusAgent-${{ matrix.os }} baked.py
- name: Bake token + build (windows)
if: matrix.os == 'windows-latest'
shell: pwsh
env:
AGENT_TOKEN: ${{ secrets.NEXUS_AGENT_TOKEN }}
run: |
(Get-Content agents/agent.py) -replace '__AGENT_TOKEN__', $env:AGENT_TOKEN | Set-Content baked.py
pyinstaller --onefile --name NexusAgent-windows baked.py
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: NexusAgent-${{ matrix.os }}
path: dist/NexusAgent*