From 68eb4c117e24e101a30eafc2d5218cb91dd4781b Mon Sep 17 00:00:00 2001 From: Guillermo Castillo Date: Wed, 11 Mar 2026 13:55:42 +0100 Subject: [PATCH] fix(LOTC-5855): Correct release version from spec --- .github/workflows/release.yml | 2 +- README.md | 9 +++++---- config/config.exs | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7212b68..75505a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: - name: Verify tag matches app version run: | TAG_VERSION="${GITHUB_REF_NAME#v}" - APP_VERSION="$(elixir -e 'IO.puts(Application.spec(:hippy, :vsn))')" + APP_VERSION="$(mix run --no-compile -e 'IO.puts(Application.spec(:hippy, :vsn))' | tail -n 1)" if [ -z "$APP_VERSION" ]; then echo "Could not read app version" diff --git a/README.md b/README.md index ef0e8ad..faf6f61 100644 --- a/README.md +++ b/README.md @@ -124,11 +124,12 @@ This repository now has automated publishing in [.github/workflows/release.yml]( ### Publish flow 1. Ensure `HEX_API_KEY` is available to Actions (typically as an organization secret). -2. Update `version` in `mix.exs` to the release version (for example `0.4.2`). -3. Create and push a matching git tag with a `v` prefix: +2. Update `version` in `mix.exs` to the release version. +3. Create and push a matching git tag from the app version: ```bash - git tag -a v0.4.2 -m "Release v0.4.2" - git push origin v0.4.2 + VERSION="$(mix run --no-compile -e 'IO.puts(Application.spec(:hippy, :vsn))' | tail -n 1)" + git tag -a "v${VERSION}" -m "Release v${VERSION}" + git push origin "v${VERSION}" ``` 4. The workflow runs tests, verifies tag/version match, publishes to Hex (`--organization draftkings`), and creates a GitHub Release. diff --git a/config/config.exs b/config/config.exs index d2d855e..becde76 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1 +1 @@ -use Mix.Config +import Config