- release.yml: generated workflow computes upload artifact names in action
shape {build-name}_{os}_{arch}_{tag|shortsha} with repo-name fallback
- workflow_test + cmd_workflow_test: artifact-name derivation coverage
- README + docs/index + docs/architecture + CLAUDE.md: refreshed to describe
current module path, builders/publishers, generated workflow/action surface,
Apple pipeline — replaces pre-spec documentation
Verified: go test ./... passes
Co-Authored-By: Virgil <virgil@lethean.io>
4.3 KiB
| title | description |
|---|---|
| Architecture | Internal design of the build, action/workflow, Apple, release, and SDK layers. |
Architecture
go-build has four major surfaces that share types but can be used independently:
pkg/buildfor discovery, builders, artifacts, caches, workflow generation, and Apple packagingpkg/releasefor versioning, changelogs, and publisherspkg/sdkfor OpenAPI diffing and SDK generationcmd/for registeringcore build,core ci, andcore sdk
Discovery and Stack Suggestion
build.Discover() and build.DiscoverFull() implement the action-style discovery pass.
They record:
- detected project types in priority order
- raw marker presence
- whether a frontend exists at the root, in
frontend/, or in a subtree up to depth 2 - distro-aware Linux package requirements
- an action-facing stack suggestion (
wails2,cpp,docs,node,go)
Important detection behaviour:
- Wails detection accepts
wails.jsonand also Go roots that contain frontend manifests - Docs detection accepts
mkdocs.ymlandmkdocs.yamlin the root ordocs/ - Docker detection accepts
DockerfileandContainerfilevariants - LinuxKit detection accepts root manifests and
.core/linuxkit/*.yml - Taskfile detection accepts common case variants
Builder Layer
Every builder implements:
type Builder interface {
Name() string
Detect(fs io.Medium, dir string) (bool, error)
Build(ctx context.Context, cfg *Config, targets []Target) ([]Artifact, error)
}
Current implementations:
| Builder | Notes |
|---|---|
| Go | Cross-compiles binaries and supports garble obfuscation plus cache env wiring |
| Wails | Handles Wails v2 directly and Wails v3 through Taskfile or CLI fallback; supports NSIS, WebView2, Deno, subtree frontends, and obfuscation |
| Node | Detects package manager, supports Deno manifests, and builds nested frontend projects |
| PHP | Composer-backed builds with deterministic zip fallback |
| Python | Deterministic source bundle packaging |
| Rust | Cargo release builds by target triple |
| Docs | MkDocs build plus zipped site output |
| Docker | Buildx-backed image builds with push/load/archive modes |
| LinuxKit | LinuxKit image generation in configured formats |
| C++ | Make + Conan orchestration with profile-based cross-builds |
| Taskfile | Generic task-backed build pipeline used heavily by Wails v3 projects |
Generated GitHub Workflow
core build workflow writes .github/workflows/release.yml. The generated workflow mirrors the modular dAppCore/build@v3 action pipeline:
- Checkout
- Discovery by file markers through
hashFiles(...) - Toolchain setup for Go, Node, Python, Conan, MkDocs, Deno, and Wails
- Linux distro-aware WebKit dependency setup for Wails
- Cache restore under
.core/cacheandcache/ core build --archive --checksum- Artifact upload with action-style names:
{build-name}_{os}_{arch}_{tag|shortsha} - Release publishing through
core ci
The workflow keeps the action inputs exposed at the CLI layer:
build-namebuild-platformbuild-tagsbuild-obfuscatensisdeno-buildwails-build-webview2build-cache
Apple Pipeline
The Apple implementation lives in pkg/build/apple.go, with an RFC-facing wrapper in pkg/build/apple/.
Key pieces:
AppleOptionsfor the runtime pipelineBuildApple()for the end-to-end macOS build flowBuildWailsApp()andCreateUniversal()for architecture-specific and universal app bundlesSign(),Notarise(),CreateDMG(),UploadTestFlight(), andSubmitAppStore()for post-build delivery- generated
Info.plistand entitlements - Xcode Cloud script generation from
.core/build.yaml
cmd/build/cmd_apple.go wires this into core build apple.
Release Layer
pkg/release owns:
- semver version resolution from git tags
- changelog generation from conventional commits
- building or reusing
dist/artifacts - checksum and artifact metadata handling
- publisher orchestration
Publishers currently cover GitHub, Docker, npm, Homebrew, Scoop, AUR, Chocolatey, and LinuxKit.
SDK Layer
pkg/sdk detects an OpenAPI spec, validates it, compares revisions with oasdiff, and generates SDKs for:
- TypeScript
- Python
- Go
- PHP
Generators prefer native tooling first and fall back to npx or Docker where appropriate.