- Pull the latest
master
branch git checkout -b v<version>_release
- Update CHANGES.rst with the changelog
- On the repo page, go to Tags->Releases->Draft a new release
- Add a dummy tag name and select "create tag on publish" -- we will not execute this, just use it to autogenerate a changelog
- The button "Generate release notes" will generate Markdown text with all PRs since the last tag -- copy that into CHANGES.rst
- Adapt the format and structure to the previous release message:
- Divide the entries into categories and try to begin entries with "New", "Add", "Fix" or "Remove" as appropriate. (This could also be automated by the above generator with some labeling effort on our part)
- We also remove the PR URLs as they clutter the log and condense the new contributors list.
- Update the version number in CITATION.cff
- On the line starting with
version:
, replace the current version number with the new version number
- On the line starting with
- Push the changes up as a PR
- Verify that the builds complete
- Merge the PR
- Create a new release on GitHub
- Add a tag name in the format "vX.Y.Z" and select "create tag on publish"
- You'll have to paste in the changelog entry and probably edit it a bit as that form expects Markdown, not ReST (probably just removing
:code:
tags will be sufficient). - Publish the release
- Approve the build and upload run under Actions. This will create the wheel and upload it to PyPI.
Official guide here.
If the upload action does not work, you can create a PyPI release manually:
- Fetch
master
, build and check the source packagespython -m pip install --upgrade build twine
python -m build
- Check the distributions (
twine check dist/*
, version will not yet be correct)
- Ensure to have a git tag in the format "vX.Y.Z"
- Build final packages and confirm the correct version number is being used
python -m build
- Check the distributions (
twine check dist/*
)
- Upload the wheel and source distributions to the test server
python -m twine upload --repository testpypi dist/*
- Verify the test repository: https://test.pypi.org/project/PyMeasure
- Confirm that the installation works (best in a separate environment)
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps pymeasure
- Upload to the real repository (
twine upload dist/PyMeasure-<version>*
) - Verify that the package is updated: https://pypi.org/project/PyMeasure
- Release to PyPI first (the feedstock pulls from there)
- Pull the latest
master
branch git checkout -b v<version>_release
- Get the SHA256 hash of the PyPI source package at https://pypi.org/project/PyMeasure/#files
- Update recipe/meta.yml with the checksum and version number. Important: Work in your personal fork of the feedstock repo (the conda-forge tooling requires that) and create a PR from there.
- Push the changes up as a PR
- Verify that the builds complete
- Merge the PR