|
| 1 | +.. SPDX-FileCopyrightText: 2023 The meson-python developers |
| 2 | +.. |
| 3 | +.. SPDX-License-Identifier: MIT |
| 4 | +
|
| 5 | +
|
| 6 | +.. _contributing-release-process: |
| 7 | + |
| 8 | +*************** |
| 9 | +Release Process |
| 10 | +*************** |
| 11 | + |
| 12 | +All releases are PGP signed with one of the keys listed in the |
| 13 | +`installation page`_. Before releasing please make sure your PGP key is listed |
| 14 | +there, and preferably signed by one of the other key holders. |
| 15 | + |
| 16 | +If your key is not signed by one of the other key holders, please make sure the |
| 17 | +PR that added your key to the :ref:`security` page was approved by at least one |
| 18 | +other maintainer. |
| 19 | + |
| 20 | +After that is done, you may release the project by following these steps: |
| 21 | + |
| 22 | +#. Release to the Git_ repository |
| 23 | + #. Create the release commit |
| 24 | + #. Bump the versions in ``meson.build`` and ``mesonpy/__init__.py`` |
| 25 | + #. Create ``CHANGELOG.rst`` section for the new release and fill it |
| 26 | + |
| 27 | + .. admonition:: Release commit format |
| 28 | + :class: important |
| 29 | + |
| 30 | + The commit message should follow the ``release X.Y.Z`` format. |
| 31 | + #. Create a signed tag for the release |
| 32 | + .. code-block:: console |
| 33 | +
|
| 34 | + $ git tag -s X.Y.Z |
| 35 | +
|
| 36 | + .. admonition:: Release commit format |
| 37 | + :class: important |
| 38 | + |
| 39 | + The tag title should follow the ``meson-python X.Y.Z`` format, and the |
| 40 | + tag body should be a plain text version of the change-log for the current |
| 41 | + release. |
| 42 | + |
| 43 | + .. admonition:: Converting the change-log text to plain text |
| 44 | + :class: hint |
| 45 | + |
| 46 | + To easily get a plain text version of the change-log, you can push the |
| 47 | + release commit and then copy the text from rendered version of the |
| 48 | + change-log in Github. |
| 49 | + |
| 50 | + #. Push the commit and tag to the repository |
| 51 | + .. code-block:: console |
| 52 | +
|
| 53 | + $ git push |
| 54 | + $ git push --tags |
| 55 | +
|
| 56 | +#. Release to PyPI_ |
| 57 | + #. Build the Python artifacts |
| 58 | + .. code-block:: console |
| 59 | +
|
| 60 | + $ python -m build |
| 61 | +
|
| 62 | + #. Sign and push the artifacts to PyPI |
| 63 | + .. code-block:: console |
| 64 | +
|
| 65 | + $ twine upload -s dist/* |
| 66 | +
|
| 67 | +
|
| 68 | +If you have any questions, please look at previous releases and/or ping the |
| 69 | +other maintainers. |
| 70 | + |
| 71 | + |
| 72 | +.. _installation page: installation |
| 73 | +.. _Git: https://git-scm.com/ |
| 74 | +.. _PyPI: https://pypi.org/ |
0 commit comments