Debian Codegraph @

docs/contributing/release_guide.rst

raw
1 *************
2 Release Guide
3 *************
4
5 Welcome to the |project| Release Guide!
6
7 This page contains information on how to release a new version
8 of |project| using the automated Continuous Delivery pipeline.
9
10 .. tip::
11
12 The intended audience for this document is maintainers
13 and core contributors.
14
15
16 Pre-release activities
17 ======================
18
19 1. Check if there are any open Pull Requests that could be
20 desired in the upcoming release. If there are any — merge
21 them. If some are incomplete, try to get them ready.
22 Don't forget to review the enclosed change notes per our
23 guidelines.
24 2. Visually inspect the draft section of the :ref:`Changelog`
25 page. Make sure the content looks consistent, uses the same
26 writing style, targets the end-users and adheres to our
27 documented guidelines.
28 Most of the changelog sections will typically use the past
29 tense or another way to relay the effect of the changes for
30 the users, since the previous release.
31 It should not target core contributors as the information
32 they are normally interested in is already present in the
33 Git history.
34 Update the changelog fragments if you see any problems with
35 this changelog section.
36 3. Optionally, test the previously published nightlies, that are
37 available through GitHub Actions CI/CD artifacts, locally.
38 4. If you are satisfied with the above, inspect the changelog
39 section categories in the draft. Presence of the breaking
40 changes or features will hint you what version number
41 segment to bump for the release.
42 5. Update the hardcoded version string in :file:`frozenlist/__init__.py`.
43 Generate a new changelog from the fragments, and commit it
44 along with the fragments removal and the Python module changes.
45 Use the following commands, don't prepend a leading-``v`` before
46 the version number. Just use the raw version number as per
47 :pep:`440`.
48
49 .. code-block:: shell-session
50
51 [dir:frozenlist] $ frozenlist/__init__.py
52 [dir:frozenlist] $ python -m towncrier build \
53 -- --version 'VERSION_WITHOUT_LEADING_V'
54 [dir:frozenlist] $ git commit -v CHANGES{.rst,/} frozenlist/__init__.py
55
56 .. seealso::
57
58 :ref:`Adding change notes with your PRs`
59 Writing beautiful changelogs for humans
60
61
62 The release stage
63 =================
64
65 1. Tag the commit with version and changelog changes, created
66 during the preparation stage. If possible, make it GPG-signed.
67 Prepend a leading ``v`` before the version number for the tag
68 name. Add an extra sentence describing the release contents,
69 in a few words.
70
71 .. code-block:: shell-session
72
73 [dir:frozenlist] $ git tag \
74 -s 'VERSION_WITH_LEADING_V' \
75 -m 'VERSION_WITH_LEADING_V' \
76 -m 'This release does X and Y.'
77
78
79 2. Push that tag to the upstream repository, which ``origin`` is
80 considered to be in the example below.
81
82 .. code-block:: shell-session
83
84 [dir:frozenlist] $ git push origin 'VERSION_WITH_LEADING_V'
85
86 3. You can open the `GitHub Actions CI/CD workflow page <GitHub
87 Actions CI/CD workflow_>`_ in your web browser to monitor the
88 progress. But generally, you don't need to babysit the CI.
89 4. Check that web page or your email inbox for the notification
90 with an approval request. GitHub will send it when it reaches
91 the final "publishing" job.
92 5. Approve the deployment and wait for the CD workflow to complete.
93 6. Verify that the following things got created:
94 - a PyPI release
95 - a Git tag
96 - a GitHub Releases page
97 7. Tell everyone you released a new version of |project| :)
98 Depending on your mental capacity and the burnout stage, you
99 are encouraged to post the updates in issues asking for the
100 next release, contributed PRs, Bluesky, Twitter etc. You can
101 also call out prominent contributors and thank them!
102
103
104 .. _GitHub Actions CI/CD workflow:
105 https://github.com/aio-libs/frozenlist/actions/workflows/ci-cd.yml