Skip to content

Commit

Permalink
[ci] Version sanity check before publishing (taichi-dev#7062)
Browse files Browse the repository at this point in the history
Issue: taichi-dev#5824 

### Brief Summary
  • Loading branch information
feisuzhu authored and PGZXB committed Jan 5, 2023
1 parent 417b80e commit dfe0a2e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,22 @@ jobs:

- name: Upload to PyPI
run: |
set -ex
ls -l dist/
if [ -z "$RELEASE_VERSION" ]; then
export PROJECT_NAME="taichi-nightly"
else
export PROJECT_NAME="taichi"
VER=$(echo $RELEASE_VERSION | sed 's/^v//')
if [ $(ls dist/taichi-$VER-*.whl | wc -l) != $(ls dist/*.whl | wc -l) ]; then
echo Version number mismatch
exit 1
fi
pip install -f dist taichi==$VER
if ! python -c 'import taichi' | grep "^.Taichi. version $VER,"; then
echo Taichi init version number mismatch!!
exit 1
fi
fi
python -m pip install requests twine
python misc/upload_release.py
Expand Down

0 comments on commit dfe0a2e

Please sign in to comment.