Skip to content

Commit fc53618

Browse files
committed
Add documentation on making a release
1 parent fc306b3 commit fc53618

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/maintaining.rst

+29
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,35 @@ To remove all additional markers and get a simple "release" version, use
8181
For more information on how to use ``bump_version``, run ``tox -e bump_version
8282
-- -help``.
8383

84+
Making a release
85+
----------------
86+
87+
Release automation is done via the ``publish.yml`` GitHub Actions workflow,
88+
which is triggered whenever a new tag is pushed and whenever a new GitHub
89+
release is made. When a new tag is pushed, the project is built and released to
90+
`Test PyPI <https://test.pypi.org>`_, and when a GitHub release is made, the
91+
project is built and released to `PyPI <https://pypi.org>`_.
92+
93+
To make a release:
94+
95+
1. Tag the repository with the current version – you can use the
96+
``./tag_release.sh`` script in the repository root to source the version
97+
automatically from the current ``VERSION`` file.
98+
2. Wait for the GitHub action to succeed, then check the results on
99+
https://test.pypi.org/project/tzdata/ .
100+
3. If everything looks good, go into the GitHub repository's `"releases" tab
101+
<https://github.com/python/tzdata/releases>`_ and click "Create a new
102+
release"; type the name of the tag into the box, fill out the remainder of
103+
the form, and click "Publish".
104+
4. Check that the release action has succeeded, then check that everything looks
105+
OK on https://pypi.org/project/tzdata/ .
106+
107+
If there's a problem with the release, use ``tox -e bump -- --post`` to create
108+
a post release, and if it's sufficiently serious, yank the broken version.
109+
110+
It is recommended to start with a release candidate first, since even Test PyPI
111+
is immutable and each release burns a version number.
112+
84113
.. Links
85114
.. |tox| replace:: ``tox``
86115
.. _tox: https://tox.readthedocs.io/en/latest/

tag_release.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/bash
2+
set -e
3+
VERSION=$(<VERSION)
4+
5+
echo "Tagging version $VERSION"
6+
git tag -s -m "Version $VERSION" $VERSION || exit "Failed to tag!"
7+
echo "Succeess"

0 commit comments

Comments
 (0)