Files
emcli/RELEASING.md
T
steve 5e3101647d
release / release (push) Successful in 3m33s
build: add cross-platform release target, tea publish, and Gitea Actions release
- Makefile `release`: cross-compiles CGO-free static binaries for linux/amd64,
  linux/arm64, darwin/amd64, darwin/arm64, windows/amd64 into dist/, named
  emcli_<version>_<os>_<arch>[.exe] (matching skills/emcli/scripts/install.sh),
  plus a sha256 checksums.txt. VERSION is injected into internal/version.String.
- Makefile `publish`: creates the Gitea release and uploads all dist/ assets via tea.
- .gitea/workflows/release.yml: on a v* tag, build + publish via the Gitea API.
- RELEASING.md: the local (make) and CI flows.

Verified end-to-end: `make release VERSION=v0.4.0` builds all five assets with the
version baked in; serving them locally, skills/emcli/scripts/install.sh downloads,
passes checksum verification, and the installed binary reports v0.4.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 20:32:22 +01:00

56 lines
2.0 KiB
Markdown

# Releasing emcli
A release publishes one static binary per platform plus a `checksums.txt`, named so the agent skill
installer (`skills/emcli/scripts/install.sh`) can fetch them:
```
emcli_<version>_<os>_<arch>[.exe] e.g. emcli_0.4.0_linux_amd64
checksums.txt sha256, one "<sum> <asset>" line per asset
```
Platforms: `linux/amd64`, `linux/arm64`, `darwin/amd64`, `darwin/arm64`, `windows/amd64`. The binary
is CGO-free, so cross-compilation needs only the Go toolchain.
## Option A — local (Makefile + tea)
```bash
# 1. Build the artifacts into dist/ (version is injected into `emcli version`)
make release VERSION=v0.4.0
# 2. Create the Gitea release for the tag and upload every dist/ asset
make publish VERSION=v0.4.0
```
`make publish` uses the `tea` CLI (already configured for this repo). It runs:
```
tea releases create --repo steve/emcli --tag v0.4.0 --title v0.4.0 --asset dist/<each-file>
```
Inspect `dist/` and `dist/checksums.txt` before publishing if you want to double-check.
## Option B — CI (Gitea Actions)
Push a version tag and let `.gitea/workflows/release.yml` build and publish:
```bash
git tag v0.4.0
git push origin v0.4.0 # (push via the tokenized HTTPS URL this repo uses)
```
The workflow runs `make release` and uploads the assets to the release via the Gitea API. It needs
Gitea Actions enabled with a runner that provides Go, make, curl, and jq. It hasn't been exercised
against this repo's runners yet — if it doesn't fit your runner setup, fall back to Option A.
## After a release
The skill installer defaults to `EMCLI_VERSION=v0.4.0`. When you cut a different version, either
publish under that tag or update the default in `skills/emcli/scripts/install.sh` (and the note in
`skills/emcli/references/install.md`).
## Versioning
`VERSION` is injected at build time into `internal/version.String` via `-ldflags -X`, so
`emcli version` prints the released tag. Without an explicit `VERSION`, the Makefile derives one from
`git describe`.