Skip to content

Commit fed7945

Browse files
authored
Merge pull request #76 from ocean/dev
ci: Improve tag extraction for NIF compilation
2 parents a7e6c54 + 9b44de6 commit fed7945

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build Precompiled NIFs
33
on:
44
push:
55
tags:
6-
- "v*"
6+
- "*.*.*"
77
workflow_dispatch:
88
inputs:
99
test_only:
@@ -62,19 +62,19 @@ jobs:
6262
6363
# Check if this is a tag push or workflow_dispatch
6464
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
65-
# Extract git tag from GITHUB_REF_NAME (e.g., "v0.8.10")
65+
# Extract git tag from GITHUB_REF_NAME (e.g., "0.9.0" or "v0.9.0")
6666
GIT_TAG="${GITHUB_REF_NAME}"
6767
6868
# Validate that git tag matches mix.exs version
69-
# Git tag should be v<version>, so strip the 'v' prefix for comparison
69+
# Strip optional 'v' prefix for comparison
7070
TAG_VERSION="${GIT_TAG#v}"
7171
7272
if [ "$VERSION" != "$TAG_VERSION" ]; then
73-
echo "::error::Version mismatch: mix.exs version is '$VERSION' but git tag is '$GIT_TAG' (without 'v': '$TAG_VERSION')"
73+
echo "::error::Version mismatch: mix.exs version is '$VERSION' but git tag is '$GIT_TAG'"
7474
exit 1
7575
fi
7676
77-
echo "✓ Version validation passed: mix.exs version '$VERSION' matches git tag '$GIT_TAG'"
77+
echo "✓ Version validation passed: mix.exs version '$VERSION' matches tag '$GIT_TAG'"
7878
else
7979
# workflow_dispatch or other non-tag trigger
8080
echo "ℹ Using version from mix.exs: '$VERSION' (not a tag push)"

0 commit comments

Comments
 (0)