Skip to content

feat(release): publish OTP tarball + GHCR image on semver tag - #12

Merged
richardcase merged 1 commit into
mainfrom
feat/release-workflow
Jul 16, 2026
Merged

richardcase merged 1 commit into
mainfrom
feat/release-workflow

Conversation

@richardcase

Copy link
Copy Markdown
Member

What

New .github/workflows/release.yml triggered on semver tag push (v*). Builds a release and publishes two artifacts to GitHub:

  • OTP tarballmix release output (bundles ERTS) attached to a GitHub Release via softprops/action-gh-release@v2. -rc/-beta tags marked prerelease.
  • Container image — pushed to ghcr.io/liquidmetal-dev/brigade:<ver> (+ :X.Y, and :latest for stable tags).

Version is driven by the git tag (v stripped) via BRIGADE_VERSION; mix.exs keeps a dev fallback. No manual bump at release time.

Supporting changes

  • mix.exsreleases: block (:assemble, :tar) + version: System.get_env("BRIGADE_VERSION") || "0.1.0"
  • config/runtime.exs — prod env-driven runtime config (BRIGADE_GRPC_PORT, BRIGADE_AUTH_TOKEN, FLINTLOCK_ENDPOINT, …); guarded to :prod, unset vars fall back to config/config.exs
  • Dockerfile + .dockerignore — multi-stage prod image (build on hexpm/elixir:1.18.4-erlang-27.3.4.14-..., runtime debian:bookworm-slim, non-root)
  • Drop google_protos depprotobuf ~> 0.14 bundles the same Google.Protobuf.* modules; duplicate modules fail mix release assembly (dev/test only warned)
  • README.md — Releases section

Verification (local)

  • MIX_ENV=prod BRIGADE_VERSION=0.0.0-test mix release → tarball emitted, bin/brigade versionbrigade 0.0.0-test
  • docker builddocker run brigade:test versionbrigade 0.0.0-test
  • mix format --check-formatted, mix compile --warnings-as-errors, mix test (27 tests, 0 failures) all pass

Tag-triggered run itself is untested (needs a pushed tag) — suggest a dry-run on a v0.0.0-rc1 tag before the first real release.

🤖 Generated with Claude Code

Add .github/workflows/release.yml triggered on `v*` tags. Two parallel
jobs: `mix release` tarball attached to a GitHub Release, and a container
image pushed to ghcr.io/liquidmetal-dev/brigade. Version is driven by the
git tag (v-stripped) via BRIGADE_VERSION.

Supporting changes:
- mix.exs: releases: block (assemble+tar) + env-driven version
- config/runtime.exs: prod env-driven runtime config
- Dockerfile + .dockerignore: multi-stage prod release image
- drop google_protos dep: protobuf ~> 0.14 bundles the same
  Google.Protobuf.* modules; duplicates fail `mix release` assembly
- README: Releases section
@richardcase
richardcase merged commit 5a08280 into main Jul 16, 2026
1 check passed
@richardcase
richardcase deleted the feat/release-workflow branch July 16, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant