name: Build Agent Binaries on: push: branches: [master] paths: ['agents/agent.py', '.gitea/workflows/build-binaries.yml'] workflow_dispatch: jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: include: - os: ubuntu-latest artifact: NexusAgent-linux - os: windows-latest artifact: NexusAgent-windows steps: - uses: actions/checkout@v4 - name: Install PyInstaller 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 ${{ matrix.artifact }} 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 ${{ matrix.artifact }} baked.py - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact }} path: dist/ Thu Oct 1 16:11:20 PDT 2026