Skip to content

How to tag and publish

Hendrik Roch edited this page Dec 5, 2023 · 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
  2. Change the version in sparkx/pyproject.toml
  3. Change the version in sparkx/setup.py
  4. 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"
    
  5. Push the tag to the remote repository with
    git push origin v1.0.12
    
  6. Go to the SPARKX GitHub repository and click on 'Releases' on the main page. Use the GUI to publish the new tag
  7. On the local machine, pull the new tag
  8. 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
  9. To upload the project and distribute it via PyPI, use
    twine upload dist/*
    
  10. 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