You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,3 +115,36 @@ If it does, please add the new generic class to the `_need_generic` list in the
115
115
We only add hints for private attributes when it has some demonstrated real-world use case.
116
116
That means from a third-party package or some well described snippet for a project.
117
117
This rule helps us avoid tying in too closely to Django’s undocumented internals.
118
+
119
+
120
+
## Releasing `django-stubs`
121
+
122
+
1. Open a pull request that updates `setup.py`, `ext/setup.py` and `README.md`
123
+
(anyone can open this PR, not just maintainers):
124
+
125
+
- Version number `major.minor.patch` is formed as follows:
126
+
127
+
`major.minor` version must match newest supported Django release.
128
+
129
+
`patch` is sequentially increasing for each stubs release. Reset to `0` if `major.minor` was updated.
130
+
131
+
- Update the `version=` value within `setup(...)` call in **both**`setup.py` files. The versions must be in sync.
132
+
- Update `django-stubs-ext>=` dependency in root `setup.py` to the same version number.
133
+
- Add a new row at the top of ['Version compatibility' table in README.md](README.md#version-compatibility).
134
+
- Use pull request title "Version x.y.z release" by convention.
135
+
136
+
2. Ensure the CI succeeds. A maintainer must merge this PR. If it's just a version bump, no need
137
+
to wait for a second maintainer's approval.
138
+
139
+
3. A maintainer must [сreate a new GitHub release](https://github.com/typeddjango/django-stubs/releases/new):
140
+
141
+
- Under "Choose a tag" enter the new version number. Do **not** use `v` prefix.
142
+
- Click "Generate release notes".
143
+
- 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)
144
+
and move them to a separate section at the top, so that they stand out. Remove the label from PRs.
145
+
- Delete all release notes lines containing `by @pre-commit-ci` or `by @dependabot`, as these
146
+
are irrelevant for our users.
147
+
148
+
4. Once you feel brave enough, click "Publish release".
149
+
150
+
5. Check that the [release workflow](https://github.com/typeddjango/django-stubs/actions/workflows/release.yml) succeeds.
0 commit comments