docs: enhance release flow documentation and add version command to CLI

- Updated AGENTS.md and README.md to clarify the automated release process using release-please and GoReleaser.
- Added a version command to the envc CLI to display build metadata.
- Included CI/CD details in README for better understanding of testing and release automation.
This commit is contained in:
2026-05-02 20:00:14 +01:00
parent 43f4b2dc96
commit 0ae52ef72d
11 changed files with 615 additions and 4 deletions
+24
View File
@@ -3,6 +3,9 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/eslider/go-config.svg)](https://pkg.go.dev/github.com/eslider/go-config)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Latest Release](https://img.shields.io/github/v/release/eSlider/go-config)](https://github.com/eSlider/go-config/releases/latest)
[![Tests](https://github.com/eSlider/go-config/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/eSlider/go-config/actions/workflows/test.yml)
[![Lint](https://github.com/eSlider/go-config/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/eSlider/go-config/actions/workflows/lint.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/eslider/go-config)](https://goreportcard.com/report/github.com/eslider/go-config)
[![GitHub Stars](https://img.shields.io/github/stars/eSlider/go-config?style=social)](https://github.com/eSlider/go-config/stargazers)
Convert **env**, **YAML**, **JSON**, and **INI** to and from Go `map[string]any` and structs. Multi-source inputs merge with **deep map merge**: nested maps combine, **scalar leaves are last-write-wins**, and **slices** default to **replace** (opt-in **concat** via `WithSliceMerge`). Keys are normalized with a configurable **lower+alnum** rule so `sub-service`, `SUB_SERVICE`, and `SubService` line up across formats. Built on [go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure).
@@ -119,6 +122,27 @@ INI uses dotted sections, e.g. `[service.subservice]` with `name=...`.
| [go-onlyoffice](https://github.com/eSlider/go-onlyoffice) | OnlyOffice API |
| [go-ollama](https://github.com/eSlider/go-ollama) | Ollama client |
## Release flow
Versions are **computed from git history**, never hardcoded in source. Commit with
[Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `feat!:` …)
and the pipeline takes care of the rest:
1. Every push / PR runs [`test.yml`](.github/workflows/test.yml) (matrix: Go 1.22, 1.23,
stable × linux/macOS/windows, `-race -shuffle=on`) and
[`lint.yml`](.github/workflows/lint.yml) (`go vet` + `golangci-lint`).
2. On merges to `main`, [`release-please.yml`](.github/workflows/release-please.yml)
parses commits since the last tag and opens a "release PR" that bumps `CHANGELOG.md`
and `.release-please-manifest.json` to the next SemVer.
3. Merging that PR creates the git tag `vX.Y.Z` and a GitHub Release.
4. The tag triggers [`release.yml`](.github/workflows/release.yml), which runs
[GoReleaser](https://goreleaser.com) to cross-compile `envc` (linux/darwin/windows ×
amd64/arm64) with `-X main.version={{.Version}}` injected at link time and attach
archives + `checksums.txt` to the release.
No version string lives in Go source — `envc version` prints the value baked in by the
release build, or `dev` for local `go install` builds.
## Decisions
Repo-local ASRs: [docs/asr/README.md](docs/asr/README.md).