Skip to content

Commit ca70469

Browse files
Fix Documentation how_to_release (#356)
1 parent f1b47d8 commit ca70469

File tree

3 files changed

+77
-87
lines changed

3 files changed

+77
-87
lines changed

doc/developer_guide/developer_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
:maxdepth: 2
99

1010
../design
11-
development
1211
plugins
1312
modules/modules
13+
../user_guide/how_to_release

doc/developer_guide/development.rst

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

doc/user_guide/how_to_release.rst

Lines changed: 76 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,79 @@
11
How to Release?
22
===============
33

4-
#. Use :code:`nox -s release:prepare` to prepare the project for a new release.
5-
#. Merge your **Pull Request** to the **default branch**
6-
#. Use :code:`git remote show origin | sed -n '/HEAD branch/s/.*: //p'` to output the **default branch**
7-
#. Use :code:`git checkout <default branch>` Switch to the **default branch**
8-
#. Use :code:`git pull` to update branch
9-
#. Use :code:`TAG=<name>` to set a variable named **"TAG"**
10-
#. Use :code:`git tag "${TAG}"` to create a new tag in your repo
11-
#. Use :code:`git push origin "${TAG}"` to push it to remote
12-
#. GitHub workflow **CD** reacts on this tag and starts the release process
4+
Creating a Release
5+
++++++++++++++++++
6+
7+
1. Set a variable named **TAG** with the appropriate version numbers:
8+
9+
.. code-block:: shell
10+
11+
TAG="<major>.<minor>.<patch>"
12+
13+
#. Prepare the project for a new release:
14+
15+
.. code-block:: shell
16+
17+
nox -s release:prepare -- "${TAG}"
18+
19+
#. Merge your **Pull Request** to the **default branch**
20+
#. Switch to the **default branch**:
21+
22+
.. code-block:: shell
23+
24+
git checkout $(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
25+
26+
#. Update branch:
27+
28+
.. code-block:: shell
29+
30+
git pull
31+
32+
#. Create a new tag in your local repo:
33+
34+
.. code-block:: shell
35+
36+
git tag "${TAG}"
37+
38+
#. Push the repo to remote:
39+
40+
.. code-block:: shell
41+
42+
git push origin "${TAG}"
43+
44+
.. hint::
45+
46+
GitHub workflow **.github/workflows/cd.yml** reacts on this tag and starts the release process
47+
48+
What to do if the release failed?
49+
+++++++++++++++++++++++++++++++++
50+
51+
The release failed during pre-release checks
52+
--------------------------------------------
53+
54+
#. Delete the local tag
55+
56+
.. code-block:: shell
57+
58+
git tag -d "${TAG}"
59+
60+
#. Delete the remote tag
61+
62+
.. code-block:: shell
63+
64+
git push --delete origin "${TAG}"
65+
66+
#. Fix the issue(s) which lead to the failing checks
67+
#. Start the release process from the beginning
68+
69+
70+
One of the release steps failed (Partial Release)
71+
-------------------------------------------------
72+
#. Check the Github action/workflow to see which steps failed
73+
#. Finish or redo the failed release steps manually
74+
75+
.. note:: Example
76+
77+
**Scenario**: Publishing of the release on Github was successfully but during the PyPi release, the upload step got interrupted.
78+
79+
**Solution**: Manually push the package to PyPi

0 commit comments

Comments
 (0)