For the body of the release, we will use your entry in the CHANGELOG, including subheadings such as `Added`, `Fixed`, etc.
However, you will need to convert the formatting from RST to Markdown.
The full changelog can be converted using this command:
sh
pandoc --from rst --to markdown+hard_line_breaks CHANGELOG.rst | sed '/^:::/d' > .CHANGELOG.md
From the converted document, you can select the relevant section to include in the github release body.
If you make a formatting mistake and realise after publishing the release on GitHub, don't worry as the release metadata can be editted.
When you are done, delete the temporary file generated by pandoc.
sh
rm .CHANGELOG.md
9. Push to PyPI
You will need to be a maintainer of this project in order to push a new version.
**Note that this step is irreversible.**
If you push the wrong thing here, you can't overwrite it.
sh
python -m pip install --upgrade setuptools wheel twine
python -m twine upload dist/*
You will be prompted for your username and password, which must be associated with a maintainer for the project.
Try out the PyPI release
You'll first need to wait a couple of minutes for the new PyPI version to become available.
Again, we create a fresh virtual environment and install the new release into it.
sh
REPODIR="$(pwd)"
cd ~
rm -rf pypi_test_env
virtualenv -p /usr/bin/python3 pypi_test_env
source pypi_test_env/bin/activate
python -m pip install fissa
python -c "import fissa; print(fissa.__version__)"
You should confirm that the version number outputted matches the version of your new release.
We now remove the temporary environment and return to the repository.
sh
deactivate
rm -rf pypi_test_env
cd "$REPODIR"
10. Update metadata on the master branch
You need to merge the updated CHANGELOG into the master branch.
There are two procedures for doing this, depending on whether your new release has the highest version number, or if it was a patch release for an older version.