@@ -10,40 +10,38 @@ taking a lot of time to make a new one.
1010    pytest releases must be prepared on **Linux ** because the docs and examples expect
1111    to be executed on that platform.
1212
13- #. Create  a branch  ``release-X.Y.Z `` with the version for the release. 
13+ To release  a version  ``MAJOR.MINOR.PATCH ``, follow these steps: 
1414
15-    * **maintenance releases **: from ``4.6-maintenance ``;
15+ #. For major and minor releases, create a new branch ``MAJOR.MINOR.x `` from the
16+    latest ``master `` and push it to the ``pytest-dev/pytest `` repo.
1617
17-    * ** patch releases **:  from the latest `` master ``; 
18+ #. Create a branch `` release-MAJOR.MINOR.PATCH ``  from the `` MAJOR.MINOR.x `` branch. 
1819
19-    * **minor releases **: from the latest ``features ``; then merge with the latest ``master ``;
20- 
21-    Ensure your are in a clean work tree.
20+    Ensure your are updated and in a clean working tree.
2221
2322#. Using ``tox ``, generate docs, changelog, announcements::
2423
25-     $ tox -e release -- <VERSION>  
24+     $ tox -e release -- MAJOR.MINOR.PATCH  
2625
2726   This will generate a commit with all the changes ready for pushing. 
2827
29- #. Open a PR for this branch targeting ``master `` (or ``4.6-maintenance `` for
30-    maintenance releases).
28+ #. Open a PR for the ``release-MAJOR.MINOR.PATCH `` branch targeting ``MAJOR.MINOR.x ``.
3129
32- #. After all tests pass and the PR has been approved, publish to PyPI by pushing the tag::
30+ #. After all tests pass and the PR has been approved, tag the release commit
31+    in the ``MAJOR.MINOR.x `` branch and push it. This will publish to PyPI::
3332
34-      git tag <VERSION>  
35-      git push [email protected] :pytest-dev/pytest.git <VERSION>  33+      git tag MAJOR.MINOR.PATCH  
34+      git push [email protected] :pytest-dev/pytest.git MAJOR.MINOR.PATCH  3635
3736   Wait for the deploy to complete, then make sure it is `available on PyPI  <https://pypi.org/project/pytest >`_.
3837
3938#. Merge the PR.
4039
41- #. If this is a maintenance release, cherry-pick the CHANGELOG / announce
42-    files to the ``master `` branch::
40+ #. Cherry-pick the CHANGELOG / announce files to the ``master `` branch::
4341
4442       git fetch --all --prune 
45-        git checkout origin/master -b cherry-pick-maintenance- release 
46-        git cherry-pick --no-commit -m1 origin/4.6-maintenance  
43+        git checkout origin/master -b cherry-pick-release 
44+        git cherry-pick --no-commit -m1 origin/MAJOR.MINOR.x  
4745       git checkout origin/master -- changelog 
4846       git commit  # no arguments 
4947
0 commit comments