|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## Commit messages |
| 4 | + |
| 5 | +This repo uses [Conventional Commits](https://www.conventionalcommits.org/). Every commit on `main` should be prefixed with a type that determines the next semver bump: |
| 6 | + |
| 7 | +| Type | Bump | Use for | |
| 8 | +| ----------- | ----- | --------------------------------------------- | |
| 9 | +| `feat:` | minor | New user-visible feature | |
| 10 | +| `fix:` | patch | Bug fix | |
| 11 | +| `docs:` | patch | Documentation only | |
| 12 | +| `style:` | patch | Formatting, gofmt, lint | |
| 13 | +| `refactor:` | patch | Code change without user-visible effect | |
| 14 | +| `test:` | patch | Test changes only | |
| 15 | +| `chore:` | patch | Build/tooling/housekeeping | |
| 16 | +| `build:` | patch | Build system / dependency bumps | |
| 17 | +| `perf:` | patch | Performance improvement | |
| 18 | +| `ci:` | none | CI config only (excluded from changelog) | |
| 19 | + |
| 20 | +Add `!` after the type, or include `BREAKING CHANGE:` in the body, to force a **major** bump: |
| 21 | + |
| 22 | +``` |
| 23 | +feat!: rename --user flag to --as |
| 24 | +
|
| 25 | +BREAKING CHANGE: --user is no longer recognised. Migrate to --as. |
| 26 | +``` |
| 27 | + |
| 28 | +Subject style (matches the rest of the repo): |
| 29 | + |
| 30 | +- lowercase, no trailing period |
| 31 | +- imperative mood ("add X", not "added X") |
| 32 | +- one short line; details go in the body |
| 33 | +- no Linear ticket prefixes (this is OSS) |
| 34 | + |
| 35 | +## Versioning |
| 36 | + |
| 37 | +Tags are bumped automatically by [`mathieudutour/github-tag-action`](https://github.com/mathieudutour/github-tag-action) on every push to `main`: |
| 38 | + |
| 39 | +- `feat:` → minor (e.g. v0.1.0 → v0.2.0) |
| 40 | +- `fix:` / most others → patch (e.g. v0.1.0 → v0.1.1) |
| 41 | +- `feat!:` or `BREAKING CHANGE:` → major (e.g. v0.1.0 → v1.0.0) |
| 42 | +- If unsure, the action falls back to **patch** (`default_bump: patch`) |
| 43 | +- `ci:` commits are excluded from changelogs but still trigger a patch bump unless they're the only change. Prefer `chore:` for tooling tweaks that should appear in the changelog. |
| 44 | + |
| 45 | +The action also produces grouped changelogs (see `.goreleaser.yaml`): |
| 46 | + |
| 47 | +- 🚀 Features |
| 48 | +- 🐛 Bug fixes |
| 49 | +- 📚 Documentation |
| 50 | +- 🛠 Maintenance |
| 51 | +- Other |
| 52 | + |
| 53 | +## Release flow |
| 54 | + |
| 55 | +Every push to `main` runs `ci.yaml`: |
| 56 | + |
| 57 | +1. `test.yaml` (build + go test + go vet) |
| 58 | +2. Tag bump |
| 59 | +3. GoReleaser publishes: |
| 60 | + - GitHub release with darwin/linux × amd64/arm64 archives + checksums |
| 61 | + - Homebrew formula push to [`agentic-utils/homebrew-tap`](https://github.com/agentic-utils/homebrew-tap) |
| 62 | + |
| 63 | +### Manual release |
| 64 | + |
| 65 | +The workflow supports `workflow_dispatch` so you can trigger a release without pushing a no-op commit: |
| 66 | + |
| 67 | +``` |
| 68 | +gh workflow run ci.yaml --repo agentic-utils/zeltapp-cli |
| 69 | +``` |
| 70 | + |
| 71 | +Useful for re-running after a failed release once the underlying issue (e.g. a token rotation) is fixed. |
| 72 | + |
| 73 | +## Local development |
| 74 | + |
| 75 | +``` |
| 76 | +go test -cover ./... |
| 77 | +gofmt -s -l . # report files needing simplification |
| 78 | +gofmt -s -w cmd/zeltapp # apply |
| 79 | +go vet ./... |
| 80 | +go build -o zeltapp ./cmd/zeltapp |
| 81 | +``` |
| 82 | + |
| 83 | +CI runs all of the above. Keep `gofmt -s` clean to preserve the Go Report Card A+ grade. |
0 commit comments