name: Release on: release: types: [published] workflow_dispatch: jobs: build: name: Build standalone binaries runs-on: ubuntu-latest # The default token is read-only, so attaching assets 403s without this. permissions: contents: write steps: - uses: actions/checkout@v5 - uses: oven-sh/setup-bun@v2 - run: bun install --frozen-lockfile # bun --compile cross-compiles, so one runner covers every target. - name: Build run: | bun run build:macos-arm64 bun run build:macos-x64 bun run build:linux-x64 bun run build:linux-arm64 bun run build:windows-x64 # An agent build runs on someone's own machine, so a downloaded binary # should be checkable against something the release states. - name: Checksums run: cd dist && sha256sum * > SHA256SUMS && cat SHA256SUMS - name: Attach to release if: github.event_name == 'release' env: GH_TOKEN: ${{ github.token }} run: gh release upload "${{ github.event.release.tag_name }}" dist/* --clobber - uses: actions/upload-artifact@v4 if: github.event_name != 'release' with: name: nodrix-agent path: dist/