diff --git a/doc/RELEASE.rst b/doc/RELEASE.rst index 886746ba5..2bf33fcc9 100644 --- a/doc/RELEASE.rst +++ b/doc/RELEASE.rst @@ -1,97 +1,65 @@ Step by step guide to releasing a new labgrid version. +labgrid follows the `calver `_ versioning scheme +``YY.MINOR[.MICRO]``. +The ``MINOR`` number starts at 0. +The ``MICRO`` number for stable releases starts at 1. -0. Preparations -=============== -Clean the `dist/` directory: - -.. code-block:: bash - - rm dist/* - -Check your commit mail and name: - -.. code-block:: bash +1. Check for relevant PRs that need a merge +=========================================== - git config --get user.name - git config --get user.email +- `Milestones `_ +- `Fixes `_ +- `Fixes for stable `_ -1. Update CHANGES.rst +2. Update CHANGES.rst ===================== Update the `CHANGES.rst` file. -Ensure that no incompatiblities are unlisted and that all major features are +Ensure that no incompatibilities are unlisted and that all major features are described in a separate section. It's best to compare against the git log. -2. Bump Version Number -====================== +Add new sections including the version number for the release in `CHANGES.rst` +(if not already done). +Set the release date. -Bump the version number in `CHANGES.rst`. +If you are bumping the ``MINOR`` number, import the changes from the latest stable +branch and add a new (unreleased) section for the next release. +Also add a new section into ``debian/changelog``. -3. Create a signed Tag -====================== - -Create a signed tag of the new release. -Your PGP-key has to be available on the computer. - -.. code-block:: bash - - git tag -s - -4. Create sdist +3. Create a tag =============== -Run the following command: - -:: +Wait for the CI to succeed on the commit you are about to tag. - pip install build - python -m build --sdist +Now create a (signed) tag of the new release. +If it should be signed (``-s``), your PGP-key has to be available on the +computer. +The release tag should start with a lower case ``v``, e.g. ``v24.0`` or +``v24.0.1``. -The sdist file will be available in the `dist/` directory. - -5. Test upload to pypi dev -========================== - -Test the upload by using twine to upload to pypi test service - -:: - - twine upload --repository-url https://test.pypi.org/legacy/ dist/* - -6. Test download from pypi dev -============================== - -Test the upload by using pypi dev as a download source - -:: - - virtualenv -p python3 labgrid-release- - source labgrid-release-/bin/activate - pip install --upgrade pip setuptools wheel - pip install --index-url https://test.pypi.org/simple/ labgrid - -And optionally run the tests: - -:: +.. code-block:: bash - pip install ".[dev]" - pytest tests + git tag -s $VERSION -7. Upload to pypi -================= +If you're happy with it, push it: -Upload the tested dist file to pypi. +.. code-block:: bash -:: + git push upstream $VERSION - twine upload dist/* +The CI should take care of the rest. +Make sure it succeeds and the new release is available on PyPi. -8. Upload the signed tag -======================== +4. Draft a release +================== -Upload the signed tag to the upstream repository +On GitHub, draft a new release, add the changes in Markdown format and create a +discussion for the release: +https://github.com/labgrid-project/labgrid/releases/new -:: +5. Create new stable branch +=========================== - git push upstream +If you are bumping the ``MINOR`` number, push a new stable branch +``stable-YY.MINOR`` based on the release tag.