summaryrefslogtreecommitdiff
path: root/RELEASING.rst
blob: 323e26cdf043bf1a65560a4c588d3d17eadad695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Release Procedure
-----------------

Our current policy for releasing is to aim for a bug-fix release every few weeks and a minor release every 2-3 months. The idea
is to get fixes and new features out instead of trying to cram a ton of features into a release and by consequence
taking a lot of time to make a new one.

.. important::

    pytest releases must be prepared on **Linux** because the docs and examples expect
    to be executed on that platform.

To release a version ``MAJOR.MINOR.PATCH``, follow these steps:

#. For major and minor releases, create a new branch ``MAJOR.MINOR.x`` from the
   latest ``master`` and push it to the ``pytest-dev/pytest`` repo.

#. Create a branch ``release-MAJOR.MINOR.PATCH`` from the ``MAJOR.MINOR.x`` branch.

   Ensure your are updated and in a clean working tree.

#. Using ``tox``, generate docs, changelog, announcements::

    $ tox -e release -- MAJOR.MINOR.PATCH

   This will generate a commit with all the changes ready for pushing.

#. Open a PR for the ``release-MAJOR.MINOR.PATCH`` branch targeting ``MAJOR.MINOR.x``.

#. After all tests pass and the PR has been approved, tag the release commit
   in the ``MAJOR.MINOR.x`` branch and push it. This will publish to PyPI::

     git tag MAJOR.MINOR.PATCH
     git push git@github.com:pytest-dev/pytest.git MAJOR.MINOR.PATCH

   Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.

#. Merge the PR.

#. Cherry-pick the CHANGELOG / announce files to the ``master`` branch::

       git fetch --all --prune
       git checkout origin/master -b cherry-pick-release
       git cherry-pick --no-commit -m1 origin/MAJOR.MINOR.x
       git checkout origin/master -- changelog
       git commit  # no arguments

#. Send an email announcement with the contents from::

     doc/en/announce/release-<VERSION>.rst

   To the following mailing lists:

   * pytest-dev@python.org (all releases)
   * python-announce-list@python.org (all releases)
   * testing-in-python@lists.idyll.org (only major/minor releases)

   And announce it on `Twitter <https://twitter.com/>`_ with the ``#pytest`` hashtag.