ref:main
Add automatic CI-driven release process #4
closed
cole.christensen@gmail.com wants to merge
feat/ci-release-process
into main
No CI
Summary
- Add CalVer (
YYYY.M.BUILD) release automation driven by Anvil CI - Modeled after huorn-minecraft’s
ci/release.sh+.anvil-ci.ymlpattern - On every
mainpush, after all checks pass: compute version, build, generate changelog, create Anvil release, tag and push
Closes #21
Changes
- ci/release.sh — CalVer version computation from git tags (increment build within month, reset on new month)
- mix.exs — Version from
$VERSIONenv var, defaults to"0.0.0-dev"for local builds - .anvil.yml — New
releasestep after compile/format/dialyzer/test, with branch guard and idempotency check
Release step workflow
- Guard: skip if not on
main - Compute version via
ci/release.sh - Idempotency: skip if tag already exists
- Build with
VERSIONenv var - Generate changelog from
git logsince last tag - Build hex package and docs
- Create Anvil release with changelog
- Tag commit and push tag
Test plan
-
ci/release.shoutputs2026.4.1with no existing tags -
ci/release.shincrements build within same month (2026.4.1->2026.4.2) -
ci/release.shresets build on month change (2026.3.5->2026.4.1) -
mix compileworks without$VERSIONset (uses0.0.0-dev) -
VERSION=2026.4.1 mix eval 'Mix.Project.config()[:version]'returns correct version - All 547 tests pass, dialyzer clean
Created Apr 09, 2026 at 13:21 UTC