From bf9773841922eea48eaf2bc442c6edc7907297f1 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 15 Sep 2026 08:21:51 -0600 Subject: [PATCH] update release instructions in CONTRIBUTING.md Signed-off-by: Joel Dice --- CONTRIBUTING.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad45a67..9a165ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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.