File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 - uses : actions/setup-python@v5
1212 with :
1313 python-version : ' 3.10'
14- - name : Validate tag matches package version
15- if : startsWith(github.ref, 'refs/tags')
16- run : |
17- TAG="${GITHUB_REF#refs/tags/}"
18- # Allow either 1.2.3.rc1 or v1.2.3.rc1 tags.
19- TAG_NO_V="${TAG#v}"
20- PKG_VERSION="$(python -c \"import omero_figure.utils as u; print(u.__version__)\")"
21-
22- echo "Tag: ${TAG}"
23- echo "Package version: ${PKG_VERSION}"
24-
25- # Compare normalized PEP 440 versions so 1.2.3.rc1 and 1.2.3rc1 are equivalent.
26- python - <<'PY'
27- import os
28- import sys
29-
30- from packaging.version import Version
31-
32- tag = os.environ["TAG_NO_V"]
33- pkg = os.environ["PKG_VERSION"]
34- tag_v = Version(tag)
35- pkg_v = Version(pkg)
36-
37- if tag_v != pkg_v:
38- print(f"ERROR: Tag ({tag}) does not match package version ({pkg}).")
39- print(f"Normalized tag={tag_v}, package={pkg_v}")
40- sys.exit(1)
41-
42- print(f"Validated normalized version match: {tag_v}")
43- PY
4414 - name : Build a binary wheel and a source tarball
4515 run : |
4616 python -mpip install build
You can’t perform that action at this time.
0 commit comments