|
| 1 | +:orphan: |
| 2 | + |
| 3 | +Instructions for aiohttp admins |
| 4 | +=============================== |
| 5 | + |
| 6 | +This page is intended to document certain processes for admins of the aiohttp repository. |
| 7 | +For regular contributors, return to :doc:`contributing`. |
| 8 | + |
| 9 | +.. contents:: |
| 10 | + :local: |
| 11 | + |
| 12 | +Creating a new release |
| 13 | +---------------------- |
| 14 | + |
| 15 | +.. note:: The example commands assume that ``origin`` refers to the ``aio-libs`` repository. |
| 16 | + |
| 17 | +To create a new release: |
| 18 | + |
| 19 | +#. Start on the branch for the release you are planning (e.g. ``3.8`` for v3.8.6): ``git checkout 3.8 && git pull`` |
| 20 | +#. Update the version number in ``__init__.py``. |
| 21 | +#. Run ``towncrier``. |
| 22 | +#. Check and cleanup the changes in ``CHANGES.rst``. |
| 23 | +#. Checkout a new branch: e.g. ``git checkout -b release/v3.8.6`` |
| 24 | +#. Commit and create a PR. Once PR is merged, continue. |
| 25 | +#. Go back to the release branch: e.g. ``git checkout 3.8 && git pull`` |
| 26 | +#. Add a tag: e.g. ``git tag -a v3.8.6 -m 'Release 3.8.6'`` |
| 27 | +#. Push the tag: e.g. ``git push origin v3.8.6`` |
| 28 | +#. Monitor CI to ensure release process completes without errors. |
| 29 | + |
| 30 | +Once released, we need to complete some cleanup steps (no further steps are needed for |
| 31 | +non-stable releases though). If doing a patch release, we need to do the below steps twice, |
| 32 | +first merge into the newer release branch (e.g. 3.8 into 3.9) and then to master |
| 33 | +(e.g. 3.9 into master). If a new minor release, then just merge to master. |
| 34 | + |
| 35 | +#. Switch to target branch: e.g. ``git checkout 3.9 && git pull`` |
| 36 | +#. Start a merge: e.g. ``git merge 3.8 --no-commit --no-ff --gpg-sign`` |
| 37 | +#. Carefully review the changes and revert anything that should not be included (most |
| 38 | + things outside the changelog). |
| 39 | +#. To ensure change fragments are cleaned up properly, run: ``python tools/cleanup_changes.py`` |
| 40 | +#. Commit the merge (must be a normal merge commit, not squashed). |
| 41 | +#. Push the branch directly to Github (because a PR would get squashed). When pushing, |
| 42 | + you may get a rejected message. Follow these steps to resolve: |
| 43 | + |
| 44 | + #. Checkout to a new branch and push: e.g. ``git checkout -b do-not-merge && git push`` |
| 45 | + #. Open a *draft* PR with a title of 'DO NOT MERGE'. |
| 46 | + #. Once the CI has completed on that branch, you should be able to switch back and push |
| 47 | + the target branch (as tests have passed on the merge commit now). |
| 48 | + #. This should automatically consider the PR merged and delete the temporary branch. |
| 49 | + |
| 50 | +Back on the original release branch, append ``.dev0`` to the version number in ``__init__.py``. |
| 51 | + |
| 52 | +If doing a minor release: |
| 53 | + |
| 54 | +#. Create a new release branch for future features to go to: e.g. ``git checkout -b 3.10 3.9 && git push`` |
| 55 | +#. Update ``target-branch`` for Dependabot to reference the new branch name in ``.github/dependabot.yml``. |
| 56 | +#. Delete the older backport label (e.g. backport-3.8): https://github.com/aio-libs/aiohttp/labels |
| 57 | +#. Add a new backport label (e.g. backport-3.10). |
0 commit comments