From d64f2b12a50ed3f0741723932a423400d206d22d Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 7 Sep 2026 18:10:11 +1000 Subject: [PATCH] ci(deploy): package archied/archie-gateway/archie-state-store/archie-playbooks as a linux/amd64 zip (archie-core-8cda.4.7.1) New dist-zip job, independent of build-and-push (no change to the archied/archie-agent Docker image jobs). Triggers on any archied/vX.Y.Z tag, so a gateway-only release (RUNTIME=skip) still produces it, keyed to the archied version alone -- these binaries aren't in tools/release.sh's two-component split and don't need to be for this. archie-agent is deliberately excluded: it only ever runs inside the Docker image build-and-push already publishes, never as a host binary. Zip contains the four linux/amd64 binaries, the new deployments/INSTRUCTIONS.md (quickstart + deployment-profile/systemd pointers), and CHANGELOG.md/CHANGELOG.archied.md/CHANGELOG.archie.md. README.md is included only if present -- it doesn't exist in this repo yet, so omitted for now rather than fabricated here. Verified locally: all four binaries build clean under GOOS=linux GOARCH=amd64 CGO_ENABLED=0 (modernc.org/sqlite is pure Go, no cgo sqlite driver to worry about), and the assembled zip's contents match what the workflow step produces. --- .github/workflows/deploy.yml | 61 ++++++++++++++++++++++++++++++++++ deployments/INSTRUCTIONS.md | 63 ++++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 deployments/INSTRUCTIONS.md diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42ec8d375..f7baa5763 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -177,3 +177,64 @@ jobs: RUNTIME_VERSION=${{ steps.versions.outputs.runtime }} cache-from: type=gha,scope=archie-agent cache-to: type=gha,mode=max,scope=archie-agent + + # Packages the host-run binaries (archied, archie-gateway, + # archie-state-store, archie-playbooks) as a linux/amd64 zip for a + # non-Docker install. Independent of build-and-push: it never touches the + # archied/archie-agent image jobs, and a gateway-only release (no + # archie/v* tag) still produces this zip -- it's keyed to the archied tag + # alone. archie-agent is deliberately excluded: it only ever runs inside + # the Docker image build-and-push already publishes, never as a host + # binary (archie-core-8cda.4.7.1). + dist-zip: + needs: gate + if: startsWith(github.ref, 'refs/tags/archied/v') + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Resolve archied version + id: version + run: echo "version=${GITHUB_REF#refs/tags/archied/v}" >> "$GITHUB_OUTPUT" + + - name: Build linux/amd64 binaries + env: + GOOS: linux + GOARCH: amd64 + CGO_ENABLED: "0" + run: | + set -e + ldflags_archied="-X github.com/samcharles93/archie-core/internal/app/archied.gatewayVersion=${{ steps.version.outputs.version }} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary" + ldflags_gateway="-X github.com/samcharles93/archie-core/internal/app/archied.gatewayVersion=${{ steps.version.outputs.version }} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary" + mkdir -p dist + go build -ldflags "$ldflags_archied" -o dist/archied ./cmd/archied + go build -ldflags "$ldflags_gateway" -o dist/archie-gateway ./cmd/archie-gateway + go build -o dist/archie-state-store ./cmd/archie-state-store + go build -o dist/archie-playbooks ./cmd/archie-playbooks + + - name: Assemble distribution zip + id: zip + run: | + set -e + name="archie-core-archied-v${{ steps.version.outputs.version }}-linux-amd64" + mkdir -p "$name" + cp dist/archied dist/archie-gateway dist/archie-state-store dist/archie-playbooks "$name/" + cp deployments/INSTRUCTIONS.md CHANGELOG.md CHANGELOG.archied.md CHANGELOG.archie.md "$name/" + # README.md doesn't exist yet in this repo; include it once it does + # rather than fail the release on its absence. + [ -f README.md ] && cp README.md "$name/" + zip -r "$name.zip" "$name" + echo "name=$name" >> "$GITHUB_OUTPUT" + + - name: Upload distribution zip + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.zip.outputs.name }} + path: ${{ steps.zip.outputs.name }}.zip + retention-days: 90 diff --git a/deployments/INSTRUCTIONS.md b/deployments/INSTRUCTIONS.md new file mode 100644 index 000000000..76005e31d --- /dev/null +++ b/deployments/INSTRUCTIONS.md @@ -0,0 +1,63 @@ +# Running this distribution + +This archive contains four linux/amd64 binaries: + +- **`archied`** — the resident daemon: polls your forge for assigned issues + and dispatches them into sandboxed `archie-agent` containers. +- **`archie-gateway`** — serves the chat (`ChatContract`) surface `archied` + dials for Telegram/webhook chat. Runs as its own process; `archied` never + embeds a gateway. +- **`archie-state-store`** — owns the single `archie.db` SQLite file behind + a gRPC contract. `archied` and `archie-gateway` are gRPC clients of it, not + owners of the database. +- **`archie-playbooks`** — standalone CLI to lint playbook binding YAML + before it reaches `archied`. + +`archie-agent` (the per-task sandboxed runtime) is **not** in this archive — +it only ever runs inside the Docker container `archied` spawns per task, never +as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`. + +## Quickstart + +1. Pick a starting configuration. The full set of annotated templates lives + in this repository's `deployments/` directory on GitHub + () — + `single-forge-github.toml`, `multi-forge-github-gitea.toml`, + `local-ollama-standalone.toml`, and `docker-nats-stack.toml` cover the + common cases. Copy whichever fits to: + + ```bash + mkdir -p ~/.config/archie + cp