# 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___[.exe] e.g. emcli_0.4.0_linux_amd64 checksums.txt sha256, one " " 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/ ``` 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. This is how v0.4.0 was published. If it ever doesn't fit your runner setup, fall back to Option A. > Note: release asset downloads are anonymous, so the repository (or at least its releases) must be > public for `skills/emcli/scripts/install.sh` to fetch binaries without a token. A private repo > returns 404 to unauthenticated downloads. ## Skill-package version bump (do this in the `chore(release):` commit, before tagging) The agent skill is versioned in lockstep with the binary. When cutting `vX.Y.Z`, update all three of these so the tagged commit is self-consistent, then commit as `chore(release): default installer to vX.Y.Z`: - `skills/emcli/scripts/install.sh` — `VERSION="${EMCLI_VERSION:-vX.Y.Z}"` (and the example asset name in the header comment). - `skills/emcli/AGENTIC-MANUAL.md` — the `EMCLI_VERSION` default in the options table. - `skills/emcli/SKILL.md` — `metadata.version: "X.Y.Z"` (no `v` prefix; mirrors the binary tag). ## 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`.