Skip to content

Commit 5866e32

Browse files
committed
Merge branch 'main' of github-1minds3t:1minds3t/omnipkg
2 parents 060dda3 + 23c649d commit 5866e32

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,16 @@ jobs:
3737
- name: Verify package version
3838
run: |
3939
PACKAGE_VERSION=$(python -c "import toml; print(toml.load(open('pyproject.toml'))['project']['version'])")
40+
TAG_VERSION="${{ github.ref_name }}"
41+
42+
# Remove 'v' prefix if it exists from the tag name
43+
RELEASE_VERSION=${TAG_VERSION#v}
44+
4045
echo "Detected version from pyproject.toml: $PACKAGE_VERSION"
41-
echo "Expected tag version: ${{ github.ref_name }}"
42-
if [ "$PACKAGE_VERSION" != "${{ github.ref_name }}" ]; then
43-
echo "Error: The version in pyproject.toml does not match the release tag."
46+
echo "Expected release version from tag: $RELEASE_VERSION (from tag $TAG_VERSION)"
47+
48+
if [ "$PACKAGE_VERSION" != "$RELEASE_VERSION" ]; then
49+
echo "Error: The version in pyproject.toml ($PACKAGE_VERSION) does not match the release tag version ($RELEASE_VERSION)."
4450
exit 1
4551
fi
4652

0 commit comments

Comments
 (0)