Only tags are used by now (not releases).
Do not remove '# Connecting' in README.md.
If a version needs to be changed, edit elm/__version__.py
.
This file is read by setup.py.
If the version is not changed, the publishing procedure works using the same version with a different build number.
The GITHUB_RUN_NUMBER environment variable, when available, is read by setup.py.
Push all changes:
git commit -a
git push
After pushing the last commit, add a local tag (shall be added AFTER the commit that needs to be published):
git tag # list local tags
git tag v0.1.4
Notes:
- correspondence between tag and
__version__.py
is not automatic. - the tag must start with "v" if a GitHub Action workflow needs to be run
Push this tag to the origin, which starts the PyPI publishing workflow (GitHub Action):
git push origin v0.1.4
git ls-remote --tags https://github.com/Ircama/ELM327-emulator # list remote tags
Check the published tag here: https://github.com/Ircama/ELM327-emulator/tags
It shall be even with the last commit.
Check the GitHub Action: https://github.com/Ircama/ELM327-emulator/actions
Check PyPI:
- https://test.pypi.org/manage/project/ELM327-emulator/releases/
- https://pypi.org/manage/project/ELM327-emulator/releases/
End user publishing page:
Verify whether wrong builds need to be removed.
Test installation:
cd
python3 -m pip uninstall -y ELM327-emulator
python3 -m pip install ELM327-emulator
elm
python3 -m pip uninstall -y ELM327-emulator
git tag # list tags
git tag -d v0.1.5 # remove local tag
git push --delete origin v0.1.5 # remove remote tag
git ls-remote --tags https://github.com/Ircama/ELM327-emulator # list remote tags
Then follow the tagging procedure again to add the tag to the latest commit.
cd <repository directory>
python3 -m build --sdist --wheel --outdir dist/ .
python3 -m twine upload --repository testpypi dist/*
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository testpypi dist/*
GITHUB_RUN_NUMBER=31 python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository testpypi dist/*
ls -l dist
rm -r build dist ELM327_emulator.egg-info