fangorn/ex_git_objectstore
public
ref:main
Add automatic CI-driven release process #21
closed
Opened by cole.christensen@gmail.com
Links
No links yet.
Problem
There is no automated release process. Versioning is hard-coded in mix.exs ("0.1.0"), there is no CI step to create releases, and publishing to Hex requires manual intervention. The huorn-minecraft project has a working model: CalVer version computation, automatic changelog from git log, artifact attachment, and tag creation — all driven by Anvil CI.
Desired Workflow
On every push to main, after all checks pass (compile, format, dialyzer, test):
- Compute version — CalVer
YYYY.MM.BUILD(e.g.,2026.04.1), incrementing build within a month, resetting on new month. Queryanvil release listfor the latest tag. - Build —
mix compile --warnings-as-errors(already exists) - Test —
mix test(already exists) - Generate changelog —
git log --oneline <last-tag>..HEAD - Create Hex package —
mix hex.buildto produce the.tarartifact - Create Anvil release —
anvil release create --tag <VERSION> --title "ExGitObjectstore <VERSION>" --body "<CHANGELOG>" --attach <hex-tar> - Tag commit —
git tag <VERSION> && git push origin <VERSION>
Acceptance Criteria
-
ci/release.shscript computes CalVer version fromanvil release list -
.anvil.ymlhas areleasestep that runs after all checks pass, only onmain -
mix.exsversion is dynamically set from$VERSIONenv var at build time, falling back to"0.0.0-dev"for local builds - Changelog is auto-generated from git log between previous tag and HEAD
- Anvil release is created with the version tag, changelog body, and hex package attached
- Git tag is created and pushed for each release
- ExDoc is generated and attached to the release as a tarball
- Release step is idempotent — re-running on same commit doesn’t create duplicates
- Local
mix compileandmix teststill work without$VERSIONset (dev default)
Notes
- Modeled after
huorn-minecraft’sci/release.sh+.anvil-ci.ymlpattern - CalVer chosen over SemVer because this library is under active development with frequent releases — CalVer avoids bikeshedding on major/minor/patch
- Hex publishing can be deferred (requires API key setup) — initial version should create the Anvil release + tag only