Skip to content

Commit e4f9a9b

Browse files
committed
[#0000] update release guide
1 parent 5db90af commit e4f9a9b

1 file changed

Lines changed: 74 additions & 50 deletions

File tree

docs/source/Support/Developer/releaseGuide.rst

Lines changed: 74 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
Release Guide
55
=============
66

7+
Major Release Guide
8+
-------------------
9+
710
These docs outline the process for releasing a new version of Basilisk. It is
811
intended for developers and maintainers of the Basilisk software.
912

1013
The high level steps to release a new version of Basilisk are as follows:
1114

12-
#. Create a new branch ``v2_X_Y`` on ``develop`` for the release.
15+
#. Create a new branch ``feature/v2_X_Y`` on ``develop`` for the release.
1316
#. Modify the version number in ``docs/source/bskVersion.txt``
1417
to reflect the new release.
1518
#. Add release date to ``docs/source/Support/bskReleaseNotes.rst``
@@ -38,7 +41,7 @@ To prepare ``develop`` for the next beta cycle:
3841
The following documentation provides detailed instructions for some of these steps.
3942

4043
Updating the Version Number
41-
---------------------------
44+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
4245
The version number is stored in the ``docs/source/bskVersion.txt`` file. This file
4346
gets read by the ``pyproject.toml`` during packaging to set the version of the
4447
package. Previously, this file was updated automatically during the CI/CD
@@ -56,29 +59,25 @@ is pushed, reset ``bskVersion.txt`` to the plain ``MAJOR.MINOR.PATCH`` form
5659
(e.g., ``2.10.2``) before tagging.
5760

5861
Updating the Release Notes
59-
--------------------------
62+
^^^^^^^^^^^^^^^^^^^^^^^^^^
6063
For normal PR development, release notes are contributed as snippet files in:
6164
``docs/source/Support/bskReleaseNotesSnippets``.
6265
These snippets are compiled and included automatically into the current
6366
``Version |release|`` section in ``docs/source/Support/bskReleaseNotes.rst`` when documentation is built.
6467

6568
Creating a Release Branch
66-
-------------------------
69+
^^^^^^^^^^^^^^^^^^^^^^^^^
6770
Active development occurs on the ``develop`` branch. Once all commits for a new
68-
minor release have been merged into ``develop``, and the version number and
69-
changelog have been updated, a new release branch should be created.
70-
71-
The release branch is named after the minor version (e.g. ``2.9``) and is a
72-
long-lived maintenance branch. It represents the released ``X.Y`` line and is
73-
used for the initial release as well as any future patch releases (``X.Y.1``,
74-
``X.Y.2``, etc.).
71+
minor release have been merged into ``develop``, then a release branch ``feature/v2_X_0`` is created
72+
off of ``develop`` where the version number and changelog are updated. After ``feature/v2_X_0``
73+
is merged into ``develop``, ``develop`` is merged into ``master`` and that commit is tagged with ``v2.X.0``.
7574

76-
All patches and fixes for the ``X.Y`` release line must be made on this branch.
75+
All patches and fixes for the ``2.X`` release line must be made on the ``patch/v2_X_x`` branch.
7776
Any changes applied to the release branch should also be merged or cherry-picked
7877
back into ``develop`` to ensure they are included in future releases.
7978

8079
Creating and Pushing Tags
81-
-------------------------
80+
^^^^^^^^^^^^^^^^^^^^^^^^^
8281
Releases are published by pushing a git tag. The ``Publish Wheels`` GitHub Actions
8382
workflow triggers on tag pushes and routes artifacts based on the tag name:
8483

@@ -99,12 +98,12 @@ This means: **pushing a tag kicks off the wheel builds on all supported
9998
platforms, builds an sdist, and then publishes the artifacts**.
10099

101100
Tag format
102-
^^^^^^^^^^
101+
""""""""""
103102
- Full release tags must follow the format ``vX.Y.Z`` (for example, ``v2.9.0``).
104103
- Release candidate tags follow ``vX.Y.ZrcN`` (for example, ``v2.10.2rc1``).
105104

106105
When to use a release candidate tag
107-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106+
"""""""""""""""""""""""""""""""""""
108107
Push an RC tag when you want to publish a pre-release build to TestPyPI for
109108
validation before committing to a final release. Typical scenarios include:
110109

@@ -126,20 +125,20 @@ The workflow for an RC release is:
126125
the production PyPI publish.
127126

128127
Where to tag
129-
^^^^^^^^^^^^
130-
Tags for the ``X.Y`` patch release line must be created from the corresponding
131-
maintenance branch (e.g. create ``v2.9.1`` from branch ``2.9``).
128+
""""""""""""
129+
Tags for the ``2.X.Y`` patch release line must be created from the corresponding
130+
maintenance branch (e.g. create tag ``v2.9.1`` on the branch ``patch/v2_9_x``).
132131

133132
Notes
134-
^^^^^
133+
"""""
135134
- Tag pushes are immutable release triggers: once a tag is pushed, CI will build
136135
and attempt to publish. If a mistake is made, prefer bumping the version and
137136
tagging again rather than reusing the same version tag.
138-
- After patching on ``X.Y``, merge or cherry-pick the fix back into ``develop``
137+
- After patching on ``v2.X``, merge or cherry-pick the fix back into ``develop``
139138
so the next release line also contains the change.
140139

141140
Creating a Release on GitHub
142-
----------------------------
141+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143142
After pushing the release tag, create a new release on GitHub:
144143

145144
#. Go to “Code” tab, on right column select Releases
@@ -152,33 +151,38 @@ After pushing the release tag, create a new release on GitHub:
152151

153152
This will make the release official and provide users with information about the new version.
154153

155-
Patch and Backport Workflow
156-
---------------------------
157-
Once a release branch (``X.Y``) exists we only maintain this latest ``X.Y`` release on ``master``
158-
and the current beta on ``develop``.
159-
160-
Where to make changes
161-
^^^^^^^^^^^^^^^^^^^^^
162-
- **New features or breaking changes**:
163-
Go directly into ``develop`` for the next beta cycle (never into a release branch).
164-
165-
- **Bug fixes for an existing release**:
166-
167-
#. Create branch on develop to test the fix.
168-
#. Create PR for this fix branch, don't update beta release notes
169-
#. On master, create a patch branch and cherry pick over the fix commit(s)
170-
#. On the patch branch, update the release notes for ``v2.X.Y`` with a release date
171-
#. Merge this branch into ``master``
172-
#. Create a Release on GitHub
173-
#. Charry pick the commit that updated the ``v2.X.Y`` release notes back into
174-
the beta cycle on ``develop``.
175-
154+
Patch Release Guide
155+
-------------------
156+
Once a major tagged release (``v2.X.0``) exists we only maintain this latest ``v2.X.Y`` patch release on
157+
a branch ``patch/v2_X_x`` and the current beta on ``develop``.
158+
159+
To release a patch version ``v2.X.Y`` the following steps are used:
160+
161+
#. If this is the first patch since ``v2.X``, create a branch off the ``v2.X.0`` tagged release on ``master``
162+
and call it ``patch/v2_X_x``. Pull this ``patch/v2_X_x`` branch.
163+
#. Cherry pick over the commits from ``develop`` for this patch release.
164+
#. Update Basilisk version number in ``docs/source/bskVersion.txt`` to ``2.X.Y``.
165+
#. Update ``docs/source/Support/bskReleaseNotes.rst`` by
166+
removing release notes snippets to add them to ``bskReleaseNotes.rst`` directly in a dated section for ``2.X.Y``.
167+
#. If needed, update ``docs/source/Support/bskKnownIssues.rst`` to have a section for ``2.X.Y``.
168+
#. Locally test a clean build of Basilisk and documentation.
169+
#. Push branch to ``origin``.
170+
#. On https://github.com/AVSLab/basilisk/actions, run the action "Pull Request" on the branch ``patch/v2_X_x``.
171+
Wait for tests to complete.
172+
#. Add a tag ``v2.X.Y`` to this branch and push tag to origin. This will trigger the wheel build process.
173+
#. The last step does not trigger the patch release documentation process as this patch release is neither
174+
on ``master`` or ``develop``. On https://github.com/AVSLab/basilisk/actions manually run the
175+
action ``Merge to master or develop`` on the branch ``patch/v2_X_x``.
176+
#. The last step deletes the online developer documentation and it needs to be rebuilt.
177+
On https://github.com/AVSLab/basilisk/actions manually run the
178+
action ``Merge to master or develop`` on the branch ``develop``.
179+
#. Create a Release on GitHub
176180

177181
.. important::
178182

179183
- Never develop directly on multiple branches in parallel for the same fix.
180184
This leads to divergence and hard-to-resolve conflicts.
181-
- Do not merge ``develop`` back into ``X.Y`` after the release branch is
185+
- Do not merge ``develop`` back into ``v2.X`` after the release branch is
182186
created. Release branches must remain stable and focused on fixes only.
183187
- Cherry-picks should be small, focused, and preferably reference the original
184188
commit hash in the message.
@@ -189,14 +193,34 @@ The `bsk-sdk <https://github.com/AVSLab/bsk_sdk>`_ package vendors the Basilisk
189193
SDK headers and runtime for plugin authors. Its version is kept in sync with
190194
Basilisk, so a new BSK release requires a corresponding SDK release.
191195

192-
CI automatically checks out the Basilisk submodule at the tag matching the
193-
version string in ``pyproject.toml``, so no manual submodule update is needed.
194-
The only manual steps are:
196+
The following steps are to be done after the Basilisk ``v2.X.Y`` release is fully completed.
197+
This ensures that the Basilisk release is completed and available on the expected Basilisk branch.
198+
199+
Major SDK Release
200+
^^^^^^^^^^^^^^^^^
201+
To release a major version ``2.X.0`` the following steps are used:
195202

196203
#. On a branch of develop, update the ``version`` field in ``pyproject.toml``
197-
to match the new BSK release (e.g. ``2.X.Y``).
198-
#. Open a PR merging the updated ``pyproject.toml`` into ``develop`` on the
199-
``bsk-sdk`` repo. The PR CI workflow will test the SDK wheel build.
204+
to match the new major BSK release (e.g. ``2.X.0``).
205+
#. Push branch to ``origin`` and create a PR to trigger the CI workflow to test the SDK wheel.
206+
#. Merge the PR to ``develop`` once CI tests pass.
200207
#. Merge ``develop`` into ``master``.
201-
#. Push the matching tag ``v2.X.Y`` to ``master`` to trigger the wheel build
208+
#. Add the tag ``v2.X.0`` to ``master`` and push tag to origin to trigger the wheel build
209+
and PyPI publish via GitHub Actions.
210+
#. Create a Release on GitHub
211+
212+
Patch Release
213+
^^^^^^^^^^^^^
214+
To release a patch version ``2.X.Y`` the following steps are used:
215+
216+
#. If this is the first patch since ``v2.X``, create a branch off the ``v2.X.0`` tagged release on ``master``
217+
and call it ``patch/v2_X_x``. Pull this ``patch/v2_X_x`` branch.
218+
#. Cherry pick over the commits from ``develop`` for this patch release.
219+
#. Update the ``version`` field in ``pyproject.toml`` to match the patch BSK release (e.g. ``2.X.Y``).
220+
#. Update ``.github/workflows/ci.yml``, section ``Install bsk-sdk wheel and Basilisk``, to pull the matching
221+
Basilisk branch ``--branch patch/v2_X_x``
222+
#. Commit edits and push to ``origin``
223+
#. Manually run the ``CI`` action on https://github.com/AVSLab/bsk_sdk/actions. Wait for tests to complete.
224+
#. Add the tag ``v2.X.Y`` to ``patch/v2_X_x`` and push tag to origin to trigger the wheel build
202225
and PyPI publish via GitHub Actions.
226+
#. Create a Release on GitHub

0 commit comments

Comments
 (0)