File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 55 types : [published]
66
77jobs :
8+ check_tag :
9+ name : Check tag
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v5
14+
15+ - uses : actions/setup-python@v5
16+ with :
17+ python-version : ' 3.11'
18+
19+ - shell : bash
20+ run : |
21+ TAG="${{ github.event.release.tag_name }}"
22+ GH_TAG_NAME="${TAG#v}"
23+ PY_VERSION=$(python - <<'PY'
24+ import pathlib, tomllib
25+ data = tomllib.loads(pathlib.Path("pyproject.toml").read_text(encoding="utf-8"))
26+ print(data.get("project").get("version"))
27+ PY
28+ )
29+ if [ "${GH_TAG_NAME}" != "${PY_VERSION}" ]; then
30+ echo "::error::Tag (${GH_TAG_NAME}) does not match pyproject.toml version (${PY_VERSION})."
31+ exit 2
32+ fi
33+
834 build_wheels :
935 name : Build wheels
1036 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments