File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1818 with :
1919 python-version : " 3.x"
2020
21+ - name : Validate release tag matches version
22+ run : |
23+ # Extract version from pyproject.toml
24+ PROJECT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
25+ # Extract tag from GitHub ref
26+ RELEASE_TAG=${GITHUB_REF#refs/tags/}
27+
28+ echo "Project version: $PROJECT_VERSION"
29+ echo "Release tag: $RELEASE_TAG"
30+
31+ if [ "$PROJECT_VERSION" != "$RELEASE_TAG" ]; then
32+ echo "Error: Release tag ($RELEASE_TAG) does not match project version ($PROJECT_VERSION)"
33+ exit 1
34+ fi
35+
36+ echo "Release tag matches project version ✓"
37+
2138 - name : Build release distributions
2239 run : |
2340 # NOTE: put your own distribution build steps here.
You can’t perform that action at this time.
0 commit comments