Skip to content

Commit d8f6438

Browse files
committed
docs: Add release instructions to CONTRIBUTING.md
1 parent 40bb2cf commit d8f6438

3 files changed

Lines changed: 53 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ repos:
1111
- id: check-merge-conflict
1212
- id: detect-private-key
1313
- repo: https://github.com/DavidAnson/markdownlint-cli2
14-
rev: v0.22.0
14+
rev: v0.22.1
1515
hooks:
1616
- id: markdownlint-cli2
1717
- repo: https://github.com/astral-sh/uv-pre-commit
18-
rev: 0.11.2 # uv version.
18+
rev: 0.11.7 # uv version.
1919
hooks:
2020
# Update the uv lockfile
2121
- id: uv-lock
2222
- repo: https://github.com/astral-sh/ruff-pre-commit
2323
# Ruff version.
24-
rev: v0.15.8
24+
rev: v0.15.12
2525
hooks:
2626
# Run the linter.
2727
- id: ruff-check

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,52 @@ Build a static site into `site/`:
9898
```bash
9999
uv run --no-dev --group docs mkdocs build
100100
```
101+
102+
## Release workflow
103+
104+
Releases are tag-driven. Pushing a `v*` tag builds the package, smoke-tests the
105+
wheel and source distribution, publishes to PyPI, creates a GitHub Release, and
106+
deploys versioned documentation with `mike`.
107+
108+
For a normal release, choose the appropriate bump kind (`patch`, `minor`, or
109+
`major`) and let `uv` update both `pyproject.toml` and `uv.lock`:
110+
111+
```bash
112+
OLD_VERSION="$(uv version --short)"
113+
uv version --bump minor
114+
NEW_VERSION="$(uv version --short)"
115+
```
116+
117+
Run the usual checks before tagging:
118+
119+
```bash
120+
uvx nox
121+
```
122+
123+
Review the version bump, then commit and tag it:
124+
125+
```bash
126+
git diff -- pyproject.toml uv.lock
127+
git add pyproject.toml uv.lock
128+
git commit -m "bump: hilbertsfc (${OLD_VERSION} => ${NEW_VERSION})"
129+
git tag -a "v${NEW_VERSION}" -m "hilbertsfc ${NEW_VERSION}"
130+
```
131+
132+
Push the commit first, then the tag that triggers the release:
133+
134+
```bash
135+
git push
136+
git push origin "v${NEW_VERSION}"
137+
```
138+
139+
### Optional TestPyPI publish
140+
If you want a TestPyPI publish before the real release, push a `test-*` tag from
141+
the same commit instead of the `v*` tag first:
142+
143+
```bash
144+
git tag -a "test-v${NEW_VERSION}" -m "hilbertsfc ${NEW_VERSION} (TestPyPI)"
145+
git push origin "test-v${NEW_VERSION}"
146+
```
147+
148+
After the TestPyPI workflow succeeds, push `v${NEW_VERSION}` to publish the real
149+
release.

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)