File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments