From 8f2a4d9fb76beb42ad41c2ed1c13105f409d983c Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 14 Sep 2024 00:23:32 +0300 Subject: [PATCH 1/4] Document the release process --- CONTRIBUTING.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 580d7bc34..fe59f71a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,3 +115,34 @@ If it does, please add the new generic class to the `_need_generic` list in the We only add hints for private attributes when it has some demonstrated real-world use case. That means from a third-party package or some well described snippet for a project. This rule helps us avoid tying in too closely to Django’s undocumented internals. + + +## Releasing `django-stubs` + +1. Open a pull request that updates `setup.py`, `ext/setup.py` and `README.md` + (anyone can open this PR, not just maintainers): + + - Increase `version=` value within `setup(...)` call in **both** files. The versions must be in sync. + - Update `django-stubs-ext>=` dependency in root `setup.py` to the same version number. + - Version number `major.minor.patch` is formed as follows: + + `major.minor` version must match newest supported Django release. + + `patch` is sequentially increasing for each stubs release. Reset to `0` if `major.minor` was updated. + + - Use pull request title "Version x.y.z release" by convention. + - Add a new row at the top of ['Version compatibility' table in README.md](README.md#version-compatibility). + +2. Ensure the CI succeeds. A maintainer must merge this PR. If it's just a verison bump, no need + to wait for a second maintainer's approval. + +3. A maintainer must [сreate a new GitHub release](https://github.com/typeddjango/django-stubs/releases/new): + + - Under "Choose a tag" enter the new version number. Do **not** use `v` prefix. + - Click "Generate release notes". + - Delete all release notes lines containing `by @pre-commit-ci` or `by @dependabot`, as these + are irrelevant for our users. + +4. Once you feel brave enough, click "Publish release". + +5. Check that the [release workflow](https://github.com/typeddjango/django-stubs/actions/workflows/release.yml) succeeds. From 43f58a84633fe362c12cb928a7aec311d3c30e5b Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 14 Sep 2024 00:54:54 +0300 Subject: [PATCH 2/4] Fix typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe59f71a4..8f7be3212 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -133,7 +133,7 @@ This rule helps us avoid tying in too closely to Django’s undocumented interna - Use pull request title "Version x.y.z release" by convention. - Add a new row at the top of ['Version compatibility' table in README.md](README.md#version-compatibility). -2. Ensure the CI succeeds. A maintainer must merge this PR. If it's just a verison bump, no need +2. Ensure the CI succeeds. A maintainer must merge this PR. If it's just a version bump, no need to wait for a second maintainer's approval. 3. A maintainer must [сreate a new GitHub release](https://github.com/typeddjango/django-stubs/releases/new): From c30d035f1f86485547d318a191af2a813854ccca Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sat, 14 Sep 2024 01:08:13 +0300 Subject: [PATCH 3/4] Also describe 'release notes reminder' label --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f7be3212..4ecda42fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -140,6 +140,8 @@ This rule helps us avoid tying in too closely to Django’s undocumented interna - Under "Choose a tag" enter the new version number. Do **not** use `v` prefix. - Click "Generate release notes". + - Look for merged PRs with the ['release notes reminder' label](https://github.com/typeddjango/django-stubs/issues?q=is%3Aopen+is%3Aissue+label%3A%22release+notes+reminder%22) + and move them to a separate section at the top, so that they stand out. Remove the label from PRs. - Delete all release notes lines containing `by @pre-commit-ci` or `by @dependabot`, as these are irrelevant for our users. From aa9cd76bcc9d15e798cfa5be19fee7c9f94f4705 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Sun, 15 Sep 2024 00:16:10 +0300 Subject: [PATCH 4/4] Update CONTRIBUTING.md Tweak phrasing & reorder bullet points. --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ecda42fe..3326b6de0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -122,16 +122,16 @@ This rule helps us avoid tying in too closely to Django’s undocumented interna 1. Open a pull request that updates `setup.py`, `ext/setup.py` and `README.md` (anyone can open this PR, not just maintainers): - - Increase `version=` value within `setup(...)` call in **both** files. The versions must be in sync. - - Update `django-stubs-ext>=` dependency in root `setup.py` to the same version number. - Version number `major.minor.patch` is formed as follows: `major.minor` version must match newest supported Django release. `patch` is sequentially increasing for each stubs release. Reset to `0` if `major.minor` was updated. - - Use pull request title "Version x.y.z release" by convention. + - Update the `version=` value within `setup(...)` call in **both** `setup.py` files. The versions must be in sync. + - Update `django-stubs-ext>=` dependency in root `setup.py` to the same version number. - Add a new row at the top of ['Version compatibility' table in README.md](README.md#version-compatibility). + - Use pull request title "Version x.y.z release" by convention. 2. Ensure the CI succeeds. A maintainer must merge this PR. If it's just a version bump, no need to wait for a second maintainer's approval.