Skip to content

Commit

Permalink
Verify version with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ol-iver committed Mar 16, 2023
1 parent fb1b54b commit a5f9c31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
- name: Verify version
run: |
python -m pip install setuptools
setup_version="$(python setup.py -V)"
setup_version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
branch_version=$(echo "${{ github.ref }}" | awk -F"/" '{print $NF}' )
if [ "${setup_version}" == "${branch_version}" ]; then
echo "Version of tag ${branch_version} matches with version of setup.py ${setup_version}"
echo "Version of tag ${branch_version} matches with version of pyproject.toml ${setup_version}"
else
echo "Version of tag ${branch_version} doesn't match with version of setup.py ${setup_version}"
echo "Version of tag ${branch_version} doesn't match with version of pyproject.toml ${setup_version}"
exit 1
fi
- name: Install dependencies
Expand Down

0 comments on commit a5f9c31

Please sign in to comment.