4.8 KiB
ADR 0007: Identify source releases independently of Go module publication
Status
Accepted. Supersedes the requirement in ADR 0005 that every release selects a Go module. Its module-scoped validation and Go module publication conventions continue to apply to those uses.
Date
2026-12-05
Context
ReleaseKit manages releases from Git repositories. A Git commit identifies the source revision; a release tag gives that revision a published name. Release notes describe the release, and a hosting service can present those notes with downloadable files. Continuous integration (CI) runs automated build and delivery jobs for the selected source.
Repositories contain different kinds of products. A configuration repository may contain only YAML or JSON. A Go application may be distributed as compiled executables. A Go library publishes versions that other Go programs download through Go's module system. These products share tagging, validation, hosted pages, and recovery needs.
ReleaseKit's existing model requires a Go module, a unit of Go source declared
in a go.mod file. It also applies Go module version rules to application
releases. Those rules connect published major versions to module import paths.
An application's product version can evolve independently when users obtain
binaries or build a checked-out source revision.
ADR 0002 prioritizes shared release mechanics and small consumer integrations. A common source-release model supports these products while preserving Go's requirements where they apply.
Decision
A release identifies a Git repository, exact committed revision, selected source scope (the directory being released), version, complete tag, and release note. ReleaseKit carries that identity consistently through validation, publication, builds, hosted delivery, diagnostics, and recovery.
Configuration expresses three distinct choices: the source being released, Go validation and build capabilities, and publication through Go's module system. Go module publication adds its version and tag rules to the common source-release model.
Go applications derive their source scope from the selected module, keeping one directory setting for builds and validation. Source-only repositories default to the repository root. File checks and release notes follow the selected source scope. Common Git and publication checks apply to both.
General source releases support Semantic Versioning and the selected calendar formats. Callers supply the version. General source tags use the selected source directory as their default prefix, with a product-prefix override. Go module publication uses Go's module tag conventions.
Module-path major-version compatibility applies when Go module publication
is selected. Go builds and tests use the selected module independently of
that choice. For example, an application can retain example.com/myapp as
its module path while distributing binaries under the product tag v2.0.0.
Publishing versions for import by Go programs or installation through
go install …@VERSION selects Go module publication and its compatibility
rules.
Source-only repositories receive tagging, publication, hosted pages, readiness checks, recovery, and delivery rehearsals through the shared workflow. Applicable file checks and configured product checks validate their contents. Go modules retain their Go test suite.
Existing profiles retain documented module-publication defaults. New examples state the publication choice explicitly. Module-backed consumers retain the tool-version selection in ADR 0004. Source-only repositories record the ReleaseKit version in one committed file read by both the maintained local launcher and CI tool setup.
Alternatives considered
- Requiring a Go module for every release preserves one existing path but gives configuration repositories an unrelated dependency declaration.
- Applying Go publication rules to every Go application couples product versions to import paths even for binary distribution.
- Separate release engines for each product type duplicate tagging, validation, hosted delivery, and recovery mechanics.
Consequences
Configuration repositories and Go applications can share ReleaseKit's release workflow while selecting capabilities appropriate to their distribution. Consumers maintain product facts and one tool-version declaration for local and CI use.
The API, configuration, validation, and saved release evidence must distinguish source scope, Go capabilities, and module publication. Existing Go consumers retain their established module conventions, and general source releases gain independent product versioning.
Exact fields, version grammars, and stored formats belong in the public contracts as implementation lands. ReleaseKit's own releases continue to follow its adopted Semantic Versioning policy.