-
Notifications
You must be signed in to change notification settings - Fork 433
Release to pypi procedure
Jay Zhang edited this page Sep 21, 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 with a new version:
- 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 - Push the branch to github, wait for CI to bless the build.
- Build the wheel
python setup.py bdist_wheel
- Test wheel package with dist/tf2onnx-*.whl
- Call
twine upload dist/tf2onnx-*.whl
- Please check the version in the
tf2onnx-*.whl
name again. - 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.
- Please check the version in the
- Go to GitHub Releases to draft a new release.
- Change Target to the proper branch.
- Tag the release commit with vx.y.z, for example v0.4.1. Then click Generate release notes to generate note automatically.
- After this step, you can also add the changelog to make a release
- Click Publish release. (We publish the installation file to PyPi, so no binaries were uploaded here.)
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.