Skip to content

Artifacts

GoReleaser generates an artifacts.json file in the dist folder containing information about all artifacts produced during the release.

This file is useful for integrating with other tools, such as jq, to query information about the release artifacts.

Structure

Each artifact in the artifacts.json file has the following fields:

FieldDescription
nameThe artifact filename
pathThe relative path to the artifact
goosThe target operating system (e.g., linux, darwin, windows)
goarchThe target architecture (e.g., amd64, arm64, 386)
goamd64The amd64 microarchitecture level (e.g., v1, v2, v3)
go386The 386 floating point instruction set
goarmThe ARM version (e.g., 6, 7)
goarm64The ARM64 version
gomipsThe MIPS floating point instruction set
goppc64The PPC64 version
goriscv64The RISC-V 64 version
targetThe full build target (e.g., linux_amd64_v1)
typeThe artifact type (see below)
extraAdditional metadata (see below)

Artifact types

The type field indicates what kind of artifact it is:

TypeDescription
ArchiveA compressed archive (tar.gz, zip, etc.)
BinaryA compiled binary
FileA generic uploadable file
Linux PackageA package created by nfpm (deb, rpm, etc.)
SnapA Snapcraft package
Docker ImageA Docker image
Published Docker ImageA published Docker image
Docker ManifestA Docker manifest
ChecksumA checksums file
SignatureA signature file
CertificateA signing certificate
SourceA source archive
Homebrew FormulaA Homebrew formula file
Homebrew CaskA Homebrew cask file
Krew Plugin ManifestA Krew plugin manifest
Scoop ManifestA Scoop manifest file
SBOMA Software Bill of Materials
PKGBUILDAn Arch Linux PKGBUILD file
SRCINFOAn Arch Linux .SRCINFO file
ChocolateyA Chocolatey package
C HeaderA C header file
C Archive LibraryA C static library
C Shared LibraryA C shared library
Winget ManifestA Winget manifest file
NixpkgA Nix package
WheelA Python wheel package
Source DistA Python source distribution
Makeself PackageA Makeself self-extracting archive
App BundleA macOS .app bundle
DMGA macOS disk image
MacOS PackageA macOS installer package
MSIA Windows MSI installer
NPM PackageAn NPM package

Extra fields

The extra field contains additional metadata that varies by artifact type. The most common fields are:

FieldTypeDescription
IDstringThe artifact ID from the configuration
BinarystringThe binary name (for archives with a single binary)
Binaries[]stringList of binary names (for archives with multiple binaries)
ExtstringThe file extension (including the leading .)
FormatstringThe archive format (e.g., tar.gz, zip)
WrappedInstringThe directory name the files are wrapped in
ChecksumstringThe checksum in algorithm:hash format
SizeintThe file size in bytes (when report_sizes is enabled)
DigeststringThe Docker image digest
ReplacesboolWhether a universal binary replaces single-arch ones
Files[]stringAny extra files an archive might have
DynamicallyLinkedboolWhether or not the binary is dynamically linked

Note

There might be other fields in extra depending on the artifact type and configuration. The fields listed above are the most commonly used ones across multiple artifact types.

Example

Here’s an example of what an artifact entry looks like:

{
  "name": "myapp_1.0.0_linux_amd64.tar.gz",
  "path": "dist/myapp_1.0.0_linux_amd64.tar.gz",
  "goos": "linux",
  "goarch": "amd64",
  "goamd64": "v1",
  "type": "Archive",
  "extra": {
    "Binaries": ["myapp"],
    "Checksum": "sha256:abc123...",
    "Format": "tar.gz",
    "ID": "default"
  }
}
Last updated on