Skip to content

Commit d899d74

Browse files
committed
Add to the release documentation
1 parent 5166d5f commit d899d74

File tree

3 files changed

+77
-53
lines changed

3 files changed

+77
-53
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Create a release
2+
================
3+
4+
Preparing a release
5+
+++++++++++++++++++
6+
7+
The ``release:prepare`` nox session affects files in the ``doc/changes`` directory:
8+
9+
* Creates & switches to a release branch (can be skipped with ``--no-branch``)
10+
* Updates the version in the ``pyproject.toml``
11+
* Moves the content of unreleased changes file ``unreleased.md`` to a versioned changes file ``changes_<version>.md``
12+
* Appends to the versioned changes file any direct dependency changes between the current ``poetry.lock`` and the one from the latest tag
13+
* Updates the ``changelog.md`` list with the newly create versioned changes file
14+
* Commits the changes (can be skipped with ``--no-add``)
15+
* Pushes the changes and creates a PR (can be deactivated with ``--no-pr``)
16+
17+
After a PR is created, approved, & merged into the default branch. A developer can use
18+
the ``release:trigger`` nox session which:
19+
20+
* Switches & pulls the changes from the default branch
21+
* Verifies that the version to be released does not already have a git tag or GitHub release
22+
* Creates a new tag & pushes it to the default branch, which will trigger the GitHub workflow ``cd.yml``
23+
24+
Simple instructions
25+
-------------------
26+
27+
The ``release:trigger`` nox session
28+
29+
30+
#. Prepare the project for a new release:
31+
32+
.. code-block:: shell
33+
34+
nox -s release:prepare -- --type {major,minor,patch}
35+
36+
#. Merge your **Pull Request** to the **default branch**
37+
38+
#. Trigger the release:
39+
40+
.. code-block:: shell
41+
42+
nox -s release:trigger
43+
44+
45+
What to do if the release failed?
46+
+++++++++++++++++++++++++++++++++
47+
48+
The release failed during pre-release checks
49+
--------------------------------------------
50+
51+
#. Delete the local tag
52+
53+
.. code-block:: shell
54+
55+
git tag -d "<major>.<minor>.<patch>""
56+
57+
#. Delete the remote tag
58+
59+
.. code-block:: shell
60+
61+
git push --delete origin "<major>.<minor>.<patch>"
62+
63+
#. Fix the issue(s) which led to the failing checks
64+
#. Start the release process from the beginning
65+
66+
67+
One of the release steps failed (Partial Release)
68+
-------------------------------------------------
69+
#. Check the GitHub action/workflow to see which steps failed
70+
#. Finish or redo the failed release steps manually
71+
72+
.. note:: Example
73+
74+
**Scenario**: Publishing of the release on GitHub was successfully but during the PyPi release, the upload step was interrupted.
75+
76+
**Solution**: Manually push the package to PyPi

doc/user_guide/features/how_to_release.rst

Lines changed: 0 additions & 52 deletions
This file was deleted.

doc/user_guide/features/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Features
66
.. toctree::
77
:maxdepth: 2
88

9-
how_to_release
9+
create_a_release
1010
collecting_metrics
1111

1212
Uniform Project Layout

0 commit comments

Comments
 (0)