Skip to content

Commit 07ed2cc

Browse files
authored
chore: update Creating a new release instructions (#510)
Release instruction updates.
1 parent 3e85217 commit 07ed2cc

File tree

1 file changed

+81
-10
lines changed

1 file changed

+81
-10
lines changed

CONTRIBUTING.rst

Lines changed: 81 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,84 @@ Then you can serve the documentation with ``make docs-serve``, or build them wit
6464
Creating a new release
6565
----------------------
6666

67-
1. Increment the version in `pyproject.toml <https://github.com/litestar-org/advanced-alchemy/blob/main/pyproject.toml>`_.
68-
.. note:: The version should follow `semantic versioning <https://semver.org/>`_ and `PEP 440 <https://www.python.org/dev/peps/pep-0440/>`_.
69-
2. `Draft a new release <https://github.com/litestar-org/advanced-alchemy/releases/new>`_ on GitHub
70-
71-
* Use ``vMAJOR.MINOR.PATCH`` (e.g. ``v1.2.3``) as both the tag and release title
72-
* Fill in the release description. You can use the "Generate release notes" function to get a draft for this
73-
3. Commit your changes and push to ``main``
74-
4. Publish the release
75-
5. Go to `Actions <https://github.com/litestar-org/advanced-alchemy/actions>`_ and approve the release workflow
76-
6. Check that the workflow runs successfully
67+
1. **Set up your environment**
68+
69+
- Ensure you have the ``gh`` CLI installed and logged in to GitHub.
70+
- Switch to the ``main`` branch.
71+
72+
2. **Install and update dependencies**
73+
74+
- Run:
75+
76+
.. code-block:: bash
77+
78+
make install # Install all dependencies
79+
make upgrade # Update dependencies to the latest versions
80+
make docs # Verify documentation builds
81+
82+
3. **Bump the version**
83+
84+
- Run:
85+
86+
.. code-block:: bash
87+
88+
make release bump=patch
89+
90+
- Use ``bump=minor`` or ``bump=major`` if you need to bump the minor or major version instead.
91+
92+
4. **Prepare the release**
93+
94+
- Run:
95+
96+
.. code-block:: bash
97+
98+
uv run tools/prepare_release.py -c -i --base v{current_version} {new_version}
99+
100+
- Replace ``{current_version}`` with the current version (e.g., ``1.2.3``).
101+
- Replace ``{new_version}`` with the new version (e.g., ``1.2.4``).
102+
- Example: ``uv run tools/prepare_release.py -c -i --base v1.4.4 1.4.5``
103+
104+
5. **Run linters and formatters**
105+
106+
- Ensure code style compliance:
107+
108+
.. code-block:: bash
109+
110+
make lint
111+
112+
6. **Clean up the changelog**
113+
114+
- Open ``docs/changelog.rst`` and remove any placeholder comments, such as:
115+
116+
.. code-block:: rst
117+
118+
<!-- By submitting this pull request, you agree to ... -->
119+
<!-- Please add in issue numbers this pull request will close ... -->
120+
121+
7. **Commit the release**
122+
123+
- Create a new branch:
124+
125+
.. code-block:: bash
126+
127+
git checkout -b v{new_version}
128+
129+
- Commit the changes:
130+
131+
.. code-block:: bash
132+
133+
git commit -am "chore(release): bump to v{new_version}"
134+
135+
8. **Open a pull request**
136+
137+
- Push the branch and create a PR into ``main``.
138+
- Merge once CI checks pass.
139+
140+
9. **Verify the release draft**
141+
142+
- Once merged, a draft release will be created under ``Releases`` on GitHub.
143+
- Edit and publish it.
144+
145+
10. **Publish to PyPI**
146+
147+
- Approve the ``Latest Release`` workflow under ``Actions`` to publish the package to PyPI.

0 commit comments

Comments
 (0)