Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix rtd and update release instructions #484

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ build:

python:
install:
- requirements: docs/requirements-docs.txt
- requirements: docs/requirements.txt
92 changes: 14 additions & 78 deletions docs/make_a_release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ Prerequisites

* You have a `GPG signing key <https://help.github.com/articles/generating-a-new-gpg-key/>`_.

-------------------------
Documentation conventions
-------------------------

The commands reported below should be evaluated in the same terminal session.

Commands to evaluate starts with a dollar sign. For example::

$ echo "Hello"
Hello

means that ``echo "Hello"`` should be copied and evaluated in the terminal.



---------------------
`PyPI`_: Step-by-step
Expand All @@ -39,92 +25,42 @@ means that ``echo "Hello"`` should be copied and evaluated in the terminal.
1. Make sure that all CI tests are passing on `GitHub Actions`_.


2. Download the latest sources

.. code::
2. Download the latest sources if you don't already have them

$ cd /tmp && \
git clone [email protected]:scikit-build/cmake-python-distributions cmake-python-distributions-release && \
cd cmake-python-distributions-release
.. code:: console

$ git clone [email protected]:scikit-build/cmake-python-distributions
$ cd cmake-python-distributions

3. List all tags sorted by version

.. code::
3. Ask nox for the instructions on what to type

$ git fetch --tags && \
git tag -l | sort -V
.. code:: console

$ nox -s tag_release

4. Choose the next release version number

.. code::
4. Run the suggested lines, probably something like this:

$ release=X.Y.Z
.. code:: console

.. warning::

To ensure the packages are uploaded on `PyPI`_, tags must match this regular
expression: ``^[0-9]+(\.[0-9]+)*(\.post[0-9]+)?$``.


5. Tag the release

.. code::

$ git tag --sign -m "cmake-python-distributions $release" $release main
$ git tag --sign -m 'cmake-python-distributions 3.29.1' 3.29.1 main
$ git push origin 3.29.1

.. warning::

We recommend using a `GPG signing key <https://help.github.com/articles/generating-a-new-gpg-key/>`_
to sign the tag.


6. Publish the release tag

.. code::
5. Check the status of the builds on `GitHub Actions`_.

$ git push origin $release
6. Once the builds are completed, check that the distributions are available on `PyPI`_.

.. note:: This will trigger builds on each CI services and automatically upload the wheels \
and source distribution on `PyPI`_.

7. Check the status of the builds on `GitHub Actions`_.

8. Once the builds are completed, check that the distributions are available on `PyPI`_.

9. Make a GitHub release based on the tag. This will display the latest version
7. Make a GitHub release based on the tag. This will display the latest version
in the GitHub sidebar, and will notify release watchers of the release.
Title it `Version X.Y.Z` and add a little note about what changed (Python only).

10. Create a clean testing environment to test the installation

.. code::

$ pushd $(mktemp -d) && \
mkvirtualenv cmake-$release-install-test && \
pip install cmake && \
cmake --version

.. note::

If the ``mkvirtualenv`` command is not available, this means you do not have `virtualenvwrapper`_
installed, in that case, you could either install it or directly use `virtualenv`_ or `venv`_.

11. Cleanup

.. code::

$ popd && \
deactivate && \
rm -rf dist/* && \
rmvirtualenv cmake-$release-install-test


.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/
.. _virtualenv: https://virtualenv.pypa.io/en/latest
.. _venv: https://docs.python.org/3/library/venv.html


.. _GitHub Actions: https://github.com/scikit-build/cmake-python-distributions/actions/workflows/build.yml

Expand Down
Loading