Move release notes to GitHub Releases and derive the version from the tag

Merged
KL
9d ago
+1016-983

Summary

A release is now a single step: create the GitHub release. There is no release PR, since the version comes from the tag and the release notes live only in GitHub Releases.

Release notes

  • CHANGELOG.md is now a regular file instead of a symlink to docs/release-notes.md. It is kept for history up to 0.54.0 and is no longer updated.
  • uvicorn.dev/release-notes redirects to the releases page through docs/_redirects. The Release Notes nav entry and the Changelog project URL point there directly.
  • scripts/sync-version is removed, since there is no changelog version left to compare with __version__.
  • The Releasing section in docs/contributing.md describes the new flow and the shape of the notes, which follows 0.54.0.

Sponsorship header

  • sponsors.yml now puts a "This project needs your help! Let's make this project sustainable together" line, with the second sentence linked to the 2027 sponsorship fund post, at the top of every published release.
  • The header no longer depends on the sponsor list. Before, an empty or unreachable list left the release untouched; the list is empty today.

Version

  • uv-dynamic-versioning reads the version from the Git tag. Tags stay unprefixed, like 0.55.0.
  • uvicorn.__version__ is imported from uvicorn/_version.py, which Hatchling writes at build time. An importlib.metadata lookup instead added about 6 ms to import uvicorn, and fails in frozen applications that ship no package metadata.
  • publish.yml fetches the full history, since a shallow checkout does not fetch the tags.
  • build-constraint-dependencies pins hatchling, uv-dynamic-versioning and their dependencies, since uv does not lock build dependencies. Both uv sync --frozen and uv build honour the pins.

Checked locally

Build fromVersion
A clone tagged 0.55.00.55.0
The sdist of that build, with no Git0.55.0
A commit after 0.54.00.54.1.dev25+67281361
A shallow clone with no tags, as in the test jobs0.0.1.dev1+ef23748
A source tree with no Git and no PKG-INFO0.0.0

The redirect was checked on the Cloudflare docs preview: /release-notes, /release-notes/ and /release-notes/index.html all return a 301 to the releases page.

Notes

  • Building from a GitHub source tarball gives 0.0.0. Downstream packagers who build that way need to build from the sdist, or set UV_DYNAMIC_VERSIONING_BYPASS to the version.
  • The GitHub Pages copy of the docs does not honour _redirects, so /release-notes/ returns a 404 there.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

Session: pi --session 01a20ccc-942b-72f1-90ed-ac23bd733985