Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,27 @@ rm -rf dist
python -m build
```

### Publishing the distribution
### Publishing a release

First, make sure you have an up-to-date version of the `twine` package installed:
Releases are published automatically via a GitHub workflow when a version tag is
pushed to the repository.

When creating a new release, first update the the version number in the project
file, examples, templates, etc. For example, if bumping the version from
`4.0.0` to `5.0.0`, use e.g.:

```bash
pip install --upgrade twine
for x in $(find examples templates -name requirements.txt) README.md pyproject.toml; \
do sed -i 's/4\.0\.0/5.0.0/' $x; \
done
```

Then, publish the distribution:
Then run `git diff` and make sure the changes look correct, editing the result
by hand if needed. Then open a PR to update the `main` branch. Once that's
merged, you can create and push a release tag with the following commands
(replacing `v5.0.0` with the version you want to deploy):

```bash
twine upload dist/*
git tag -s v5.0.0 -m v5.0.0
git push origin v5.0.0
```

This first time you run that, it will ask for a username and password. Enter
`__token__` for the username and specify a valid PyPI token as the password.
Contact Joel Dice for a token if you don't have one.
Loading