Making a release
.github/workflows/release.yml publishes to PyPI
when a version tag is pushed.
- In a pull request, bump
__version__insrc/neuroseq/__init__.pyand merge it intomain. - Once CI on
mainhas passed, tag the merge commit with the same version (novprefix):
- The workflow checks that the commit is on
mainand the tag matches__version__, builds the sdist and wheel, tests the installed wheel (including the bundled docs), uploads to PyPI and creates a GitHub release with generated notes.
Only *.*.* tags on neuroseq/neuroseq publish. The tag push does not run the
test suite. Pull requests and pushes to main only build and test the package.
Publishing setup
Uploads use PyPI trusted publishing
(no stored token). This needs a trusted publisher on PyPI for neuroseq/neuroseq,
workflow release.yml, environment pypi, and a pypi environment in the
GitHub repository settings (add required reviewers to gate uploads).