Go Build Release logo

Go Build Release

Community
eduardo-sl
go-build-release

Build and release Go binaries that are reproducible and verifiable: version stamping, -trimpath builds, cross-compilation, GoReleaser, checksums, SBOMs, cosign signing, build provenance attestations, and container images with ko or a multi-stage Dockerfile. Use when: "release a Go binary", "set up GoReleaser", "cross-compile", "reproducible build", "sign the release", "generate an SBOM", "build provenance", "publish a container image", "version command shows (devel)". Not for: test and lint pipelines (go-ci), shrinking the binary or image (go-binary-size), auditing dependencies (go-dependency-audit).

Overview

Publishereduardo-sl
Repositorygo-agent-skills
Skill namego-build-release
Stars
86
Forks
11
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by eduardo-sl on GitHub. Read the source before you install it.

Installation

Install the Go Build Release AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/(workflow)/go-build-release
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.

Use it in TypingMind

Enable Go Build Release in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Go Build Release on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Go Build Release is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Go Build and Release

A release is a promise that the binary users run is the one your source and pipeline produced. Make it reproducible so anyone can rebuild it, and verifiable so anyone can check it — before automating the publishing.

Detailed reference material, loaded on demand:

  • references/goreleaser.md — a complete .goreleaser.yaml and the tag-triggered release workflow.
  • references/supply-chain.md — SBOMs, cosign signing and verification, provenance attestations, signing container images.

Read a reference file only when the summary below is not enough.

1. Version Stamping

go
// Go 1.24+: built from a git checkout, Main.Version is the tag (v1.4.0)
// or a pseudo-version; vcs.* settings carry the commit and dirty flag.
info, _ := debug.ReadBuildInfo()
fmt.Println(info.Main.Version, info.GoVersion)
bash
go version -m ./bin/api          # inspect what a binary was built from
  • Prefer build info: it needs no flags and cannot drift from the source.
  • When a release tool builds from an archive without .git, inject the values: -ldflags "-X main.version=v1.4.0 -X main.commit=$SHA".
  • Never stamp the wall-clock build time — it makes every build unique. Use the commit time if you need a date.

2. Reproducible Builds

The same source, toolchain and flags must give byte-identical binaries:

bash
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o bin/api ./cmd/api
sha256sum bin/api   # rebuild in a clean checkout and compare
  • -trimpath removes your machine's paths from the binary.
  • Pin the toolchain: the go and toolchain lines in go.mod, the same image or setup-go version in CI. Go's own toolchain is reproducible since 1.21.
  • CGO_ENABLED=0 unless you need cgo — a C toolchain is one more input that varies between machines.
  • go mod download and go mod verify before building, so a tampered module cache fails the build.

3. Cross-Compilation

bash
go tool dist list                                  # every GOOS/GOARCH pair
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -o bin/api-linux-arm64 ./cmd/api
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -o bin/api.exe ./cmd/api

Pure Go cross-compiles from any host. With cgo you need a C cross-compiler per target; prefer pure-Go dependencies (e.g. a pure-Go SQLite driver) when you ship to several platforms. Raise GOAMD64 (v2/v3) only when every target CPU supports it — the binary will not start on older ones.

4. Release Automation with GoReleaser

One config builds every target, archives, checksums, SBOMs and signs:

yaml
# .goreleaser.yaml (excerpt — full file in references/goreleaser.md)
version: 2
builds:
  - main: ./cmd/api
    env: [CGO_ENABLED=0]
    flags: [-trimpath]
    ldflags: ["-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}"]
    mod_timestamp: "{{ .CommitTimestamp }}" # reproducible file times
    goos: [linux, darwin, windows]
    goarch: [amd64, arm64]
checksum:
  name_template: checksums.txt
bash
goreleaser check                         # validate the config
goreleaser release --snapshot --clean    # full dry run, nothing published

Release on tag push (v1.4.0) from CI, never from a laptop: the pipeline is the only place whose inputs are recorded.

5. Supply-Chain Artifacts

ArtifactAnswersProduced by
checksums.txtDid my download arrive intact?GoReleaser checksum
SBOM (SPDX or CycloneDX)What is inside this binary?syft, GoReleaser sboms
Signature bundle (.sigstore.json)Did this project's pipeline publish it?cosign sign-blob --bundle, keyless in CI
Provenance attestationWhich workflow, commit and runner built it?actions/attest (SLSA provenance)

Sign the checksums file rather than every archive — one signature then covers them all. Keyless signing uses the CI job's OIDC identity, so there is no private key to leak or rotate. Publish the exact verification commands in the release notes; a signature nobody verifies protects nobody. Commands: references/supply-chain.md.

6. Container Images

  • Pure-Go services: ko. Builds from the Go source without a Dockerfile, on a distroless base, multi-arch, with an SBOM, reproducibly: KO_DOCKER_REPO=ghcr.io/acme ko build --bare --platform=linux/amd64,linux/arm64 ./cmd/api.
  • Otherwise a multi-stage Dockerfile: build in golang:<version>, copy the binary into gcr.io/distroless/static:nonroot, run as non-root.
  • Reference images by digest in deployments, and sign them with cosign.
  • Image size is owned by the go-binary-size skill.

7. Versioning

  • Tags are semver with a v prefix: v1.4.0. Never move or delete a published tag — the module proxy has cached it, and users' go.sum pins its hash.
  • A breaking change to a library is a new major version with a /v2 module path, not just a v2.0.0 tag.
  • A bad release is withdrawn with retract in go.mod (the go-dependency-audit skill), then fixed in a new patch release.
  • Generate release notes from Conventional Commits (git-commit skill); GoReleaser's changelog.groups sorts them into features and fixes.

Verification Checklist

  1. go version -m on the release binary shows the tag and commit
  2. Two clean builds of the same tag produce identical SHA-256 sums
  3. -trimpath, CGO_ENABLED=0 (or a justified cgo build), pinned toolchain
  4. No build timestamps; file times derived from the commit
  5. Releases come from a tag-triggered CI job, never a laptop
  6. checksums.txt is signed; SBOMs are published; provenance is attested
  7. Release notes include the cosign verify-blob / gh attestation verify commands
  8. Images built with ko or multi-stage on distroless, non-root, referenced by digest
  9. Published tags are never moved; bad releases are retracted

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Go Build Release AI skill do?

Build and release Go binaries that are reproducible and verifiable: version stamping, -trimpath builds, cross-compilation, GoReleaser, checksums, SBOMs, cosign signing, build provenance attestations, and container images with ko or a multi-stage Dockerfile. Use when: "release a Go binary", "set up GoReleaser", "cross-compile", "reproducible build", "sign the release", "generate an SBOM", "build provenance", "publish a container image", "version command shows (devel)". Not for: test and lint pipelines (go-ci), shrinking the binary or image (go-binary-size), auditing dependencies (go-dependen...

Why use Go Build Release on TypingMind?

Because you install it once and use it with any model. Go Build Release is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Go Build Release in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/(workflow)/go-build-release. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Go Build Release?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Go Build Release?

As many as you like. As long as a model supports skills, you can use Go Build Release with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Go Build Release AI skill free?

Yes. It is published on GitHub by eduardo-sl under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇