-
Notifications
You must be signed in to change notification settings - Fork 440
Release to pypi procedure
Deyu Huang edited this page May 9, 2022
·
12 revisions
We follow release naming convention similar to tensorflow:
-
Install Twine, a utility tool to interact with PyPI. Do -
pip install twine
-
Releases come from release branches named
rx.y
, for example r0.4. Multiple release maybe come from the same release branch. When we release to pypi we tag the commit the release is on withvx.y.z
, for example v0.4.1.
The steps to release to pypi:
- take a branch, for example
git checkout -b r0.4
- edit/commit the file
VERSION
to include the full version number (x.y.z), for example 0.4.1 - tag the release commit with vx.y.z, for example v0.4.1
- push the branch to github, wait for CI to bless the build, and add the changelog to release it
- build the wheel:
python setup.py bdist_wheel
- Test wheel package with dist/tf2onnx-*.whl
- call
twine upload dist/tf2onnx-*.whl
- NOTE: Once the packages are uploaded to PyPI, you cannot overwrite it on the same PyPI instance. Please make sure everything is good on TestPyPI before uploading to PyPI
If you want another release from the same release branch (ie. you release a patch), merge your changes and go to step 2.
If you started a new branch you want to increment the version in master's VERSION.
Preferred, the release happens on a linux box to avoid CRLF in the released files.