Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build Precompiled NIFs
on:
push:
tags:
- "v*"
- "*.*.*"
workflow_dispatch:
inputs:
test_only:
Expand Down Expand Up @@ -62,19 +62,19 @@ jobs:

# Check if this is a tag push or workflow_dispatch
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
# Extract git tag from GITHUB_REF_NAME (e.g., "v0.8.10")
# Extract git tag from GITHUB_REF_NAME (e.g., "0.9.0" or "v0.9.0")
GIT_TAG="${GITHUB_REF_NAME}"

# Validate that git tag matches mix.exs version
# Git tag should be v<version>, so strip the 'v' prefix for comparison
# Strip optional 'v' prefix for comparison
TAG_VERSION="${GIT_TAG#v}"

if [ "$VERSION" != "$TAG_VERSION" ]; then
echo "::error::Version mismatch: mix.exs version is '$VERSION' but git tag is '$GIT_TAG' (without 'v': '$TAG_VERSION')"
echo "::error::Version mismatch: mix.exs version is '$VERSION' but git tag is '$GIT_TAG'"
exit 1
fi

echo "✓ Version validation passed: mix.exs version '$VERSION' matches git tag '$GIT_TAG'"
echo "✓ Version validation passed: mix.exs version '$VERSION' matches tag '$GIT_TAG'"
else
# workflow_dispatch or other non-tag trigger
echo "ℹ Using version from mix.exs: '$VERSION' (not a tag push)"
Expand Down