@@ -5,37 +5,82 @@ Our current policy for releasing is to aim for a bug-fix release every few weeks
5
5
is to get fixes and new features out instead of trying to cram a ton of features into a release and by consequence
6
6
taking a lot of time to make a new one.
7
7
8
+ The git commands assume the following remotes are setup:
9
+
10
+ * ``origin ``: your own fork of the repository.
11
+ * ``upstream ``: the ``pytest-dev/pytest `` official repository.
12
+
8
13
Preparing: Automatic Method
9
14
~~~~~~~~~~~~~~~~~~~~~~~~~~~
10
15
11
16
We have developed an automated workflow for releases, that uses GitHub workflows and is triggered
12
- by opening an issue or issuing a comment one.
17
+ by opening an issue.
18
+
19
+ Bug-fix releases
20
+ ^^^^^^^^^^^^^^^^
21
+
22
+ A bug-fix release is always done from a maintenance branch, so for example to release bug-fix
23
+ ``5.1.2 ``, open a new issue and add this comment to the body::
24
+
25
+ @pytestbot please prepare release from 5.1.x
26
+
27
+ Where ``5.1.x `` is the maintenance branch for the ``5.1 `` series.
28
+
29
+ The automated workflow will publish a PR and notify it as a comment in the issue.
30
+
31
+ Minor releases
32
+ ^^^^^^^^^^^^^^
33
+
34
+ 1. Create a new maintenance branch from ``master ``::
35
+
36
+ git fetch --all
37
+ git branch 5.2.x upstream/master
38
+ git push upstream 5.2.x
13
39
14
- The comment must be in the form ::
40
+ 2. Open a new issue and add this comment to the body ::
15
41
16
- @pytestbot please prepare release from BRANCH
42
+ @pytestbot please prepare release from 5.2.x
17
43
18
- Where `` BRANCH `` is `` master `` or one of the maintenance branches .
44
+ The automated workflow will publish a PR and notify it as a comment in the issue .
19
45
20
- For major releases the comment must be in the form::
46
+ Major and release candidates
47
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
48
22
- @pytestbot please prepare major release from master
49
+ 1. Create a new maintenance branch from `` master ``::
23
50
24
- After that, the workflow should publish a PR and notify that it has done so as a comment
25
- in the original issue.
51
+ git fetch --all
52
+ git branch 6.0.x upstream/master
53
+ git push upstream 6.0.x
54
+
55
+ 2. For a **major release **, open a new issue and add this comment in the body::
56
+
57
+ @pytestbot please prepare major release from 6.0.x
58
+
59
+ For a **release candidate**, the comment must be (TODO: `#7551 <https://github.com/pytest-dev/pytest/issues/7551>`__)::
60
+
61
+ @pytestbot please prepare release candidate from 6.0.x
62
+
63
+ The automated workflow will publish a PR and notify it as a comment in the issue.
64
+
65
+ At this point on, this follows the same workflow as other maintenance branches: bug-fixes are merged
66
+ into ``master `` and ported back to the maintenance branch, even for release candidates.
67
+
68
+ **A note about release candidates **
69
+
70
+ During release candidates we can merge small improvements into
71
+ the maintenance branch before releasing the final major version, however we must take care
72
+ to avoid introducing big changes at this stage.
26
73
27
74
Preparing: Manual Method
28
75
~~~~~~~~~~~~~~~~~~~~~~~~
29
76
30
- .. important ::
31
-
32
- pytest releases must be prepared on **Linux ** because the docs and examples expect
33
- to be executed on that platform.
77
+ **Important **: pytest releases must be prepared on **Linux ** because the docs and examples expect
78
+ to be executed on that platform.
34
79
35
80
To release a version ``MAJOR.MINOR.PATCH ``, follow these steps:
36
81
37
- #. For major and minor releases, create a new branch ``MAJOR.MINOR.x `` from the
38
- latest `` master `` and push it to the `` pytest-dev/pytest `` repo .
82
+ #. For major and minor releases, create a new branch ``MAJOR.MINOR.x `` from
83
+ `` upstream/ master `` and push it to `` upstream `` .
39
84
40
85
#. Create a branch ``release-MAJOR.MINOR.PATCH `` from the ``MAJOR.MINOR.x `` branch.
41
86
@@ -69,7 +114,7 @@ Both automatic and manual processes described above follow the same steps from t
69
114
70
115
git fetch --all --prune
71
116
git checkout origin/master -b cherry-pick-release
72
- git cherry-pick -x -m1 origin /MAJOR.MINOR.x
117
+ git cherry-pick -x -m1 upstream /MAJOR.MINOR.x
73
118
74
119
#. Open a PR for ``cherry-pick-release `` and merge it once CI passes. No need to wait for approvals if there were no conflicts on the previous step.
75
120
0 commit comments