You will need to set up a gpg key (see the astropy docs section on this for more), PyPI account, and install twine before following these steps.
Ensure all of the issues slated for this release on GitHub are either closed or moved to a new milestone.
Pull a fresh copy of the main branch from GitHub down to your local machine.
Update the Changelog - Move the filled out changelog headers from unreleased to a new released section with release version number.
Make a commit with this change.
Tag the commit you just made (replace version numbers with your new number):
$ git tag -s v0.5.2 -m "tagging version 0.5.2"
Checkout tagged version (replace version number):
$ git checkout v0.5.2
(optional but encouraged) Run test suite locally, make sure they pass.
Now we do the PyPI release (steps 20,21 in the astropy release procedures):
$ git clean -dfx $ cd astropy_helpers; git clean -dfx; cd .. $ python setup.py build sdist $ gpg --detach-sign -a dist/specutils-0.5.1.tar.gz $ twine upload dist/specutils-0.5.1.tar.gz
Back to development - add the next version number to the changelog as an “unreleased” section
Push to Github with
--tags(you may need to lift direct main push restrictions on the GitHub repo)
Do “release” with new tag on GitHub repo.
If there is a milestone for this release, “close” the milestone on GitHub.
Double-check (and fix if necessary) that relevant conda builds have proceeded sucessfully (e.g. https://github.com/conda-forge/specutils-feedstock)