Skip to main content
LTHN Documentation
Back to website
Components

Core Build

Build, release, and signing orchestration that auto-detects the project type, runs matrix builds, signs artefacts, and publishes them.

doc/components/build.md

Core Build is the build, release, and signing orchestration behind the core build, core release, core sdk, and core ci commands. It auto-detects the project type, runs cross-platform matrix builds, signs the artefacts, and publishes them to the package managers. The Go module is dappco.re/go/build.

Install

go get dappco.re/go/build@latest
import "dappco.re/go/build"

Most use is through the CLI rather than the library.

core build
core build --targets linux/amd64,darwin/arm64
core release

With no .core/build.yaml, core build falls back to a simple passthrough — roughly go build .. With a config file present, it runs a matrix build across every declared target.

Project discovery

Core Build detects the project type from marker files, so there is no per-repository build script. It recognises more than eleven types: Go, Wails, Node, Deno, PHP, Python, Rust, C++, Docker, LinuxKit, Taskfile, and MkDocs. Detection follows a priority order — for example, wails.json before go.mod — and also checks nested frontend manifests such as frontend/package.json.

The build pipeline

A build runs as a sequence of phases:

  1. Setup — validate config, resolve dependencies
  2. PreBuild — run frontend builds (npm, deno)
  3. Build — compile all targets
  4. Archive — create tar.gz or zip archives
  5. Checksum — generate SHA-256 checksums
  6. Sign — code signing
  7. Package — create installers (NSIS, DMG, and so on)
  8. Publish — upload to the configured destinations

Targets are OS and architecture pairs — linux/amd64, darwin/arm64, windows/amd64, and the rest — and the build runs them as a matrix with optional caching.

Code signing

Signing covers the three major platforms:

  • GPG — detached signatures for binaries
  • macOScodesign with Developer ID certificates, plus notarisation through Apple's service
  • Windows — SignTool with Authenticode certificates

For Apple targets, Core Build also produces universal binaries, DMG packages, and TestFlight and App Store submissions.

Release and publishing

core release resolves the version from git tags, generates a changelog, builds, signs, and then publishes. There are eight publishers: GitHub, Docker, npm, Homebrew, Scoop, Chocolatey, AUR, and LinuxKit.

core release --tag v1.0.0 --sign --publish

SDKs and CI

core sdk generates OpenAPI clients for TypeScript, Python, Go, and PHP, with optional breaking-change detection between specs.

core sdk --languages typescript,python,go --diff

Core Build also generates reusable GitHub Actions workflows, so a repository's CI mirrors the same discovery and build logic as the local CLI.

core build workflow --output .github/workflows/release.yml