Skip to content

How to tag and publish

Hendrik Roch edited this page Apr 21, 2024 · 5 revisions

If a new version has to be tagged, follow the steps below:

Prerequisites: Make sure that the python packages build and twine are installed on your local machine. If this is not the case, do so with

pip install build
pip install twine
  1. Make sure all changes corresponding to the new version have been merged into the main branch

    1.1. Update all the version numbers in the code (documentation: conf.py, package: pyproject.toml, setup.py).

    1.2. Check CHANGELOG.md and CONTRIBUTORS.mdfiles.

  2. On the local machine, pull all changes of the main branch and create an annotated tag. For the exemplary version 1.0.12, this is done with the command

    git tag -a v1.0.12 -m "version 1.0.12"
    
  3. Push the tag to the remote repository with

    git push origin v1.0.12
    
  4. Go to the SPARKX GitHub repository and click on 'Releases' on the main page. Use the GUI to publish the new tag

  5. On the local machine, pull the new tag

  6. Go to the SPARKX root directory and create publishable project files for PyPI with

    python3 -m build
    

    This will automatically create a new directory dist/ which contains all necessary files

  7. Upgrade pip3 install twine --upgrade and pip3 install pkginfo --upgrade

  8. To upload the project and distribute it via PyPI, use

    twine upload dist/*
    
  9. In the terminal, you will be asked for the username and password corresponding to the SPARKX package on PyPI. After entering, the package will be uploaded and is available via pip install sparkx

Clone this wiki locally