|
| 1 | +.. _release_process: |
| 2 | + |
1 | 3 | How to cut a new release: |
2 | 4 | ========================= |
3 | 5 |
|
4 | 6 | Update version |
5 | 7 | -------------- |
6 | 8 |
|
7 | | -- Run bumpversion with major, minor or patch to bump the version in |
8 | | - ``setup.cfg`` and ``src/scancode_config.py``. Note that this is CalVer. |
| 9 | +- Bump version to update major, minor or patch version in ``setup.cfg`` |
| 10 | + ``setup-mini.cfg`` and ``src/scancode_config.py``. Note that this is SemVer, |
| 11 | + though we used CalVer previously, we have switched back to SemVer. |
| 12 | + |
| 13 | +- If scancode output data format is changed, increment manually the major, |
| 14 | + minor or patch version to bump the version in ``src/scancode_config.py``. |
| 15 | + Note that this is SemVer. |
9 | 16 |
|
10 | | -- If scancode output data format is changed, increment manually the major, minor or patch |
11 | | - to bump the version in ``src/scancode_config.py``. Note that this is SemVer. |
| 17 | +See our :ref:``versioning`` for more details. |
12 | 18 |
|
13 | 19 | Tag and publish |
14 | 20 | --------------- |
15 | 21 |
|
16 | | -- Update the CHANGELOG.rst |
| 22 | +- Changes for a release should also be pushed to a branch and a pull |
| 23 | + Request should be created for it, for review. |
| 24 | + |
| 25 | +- Update the CHANGELOG.rst with detailed documentation of updates |
| 26 | + and API/CLI option changes, or any significant changes. |
17 | 27 |
|
18 | | -- Commit these changes and push changes to develop: |
| 28 | +- Commit these changes and push changes to develop (here we use an |
| 29 | + example tag ``v1.6.1``): |
19 | 30 |
|
20 | | - - ``git commit -m "commit message"`` |
21 | | - - ``git push --set-upstream origin develop`` |
| 31 | + - ``git commit -s`` |
| 32 | + - ``git push --set-upstream origin release-prep-v1.6.1`` |
22 | 33 |
|
23 | | -- Merge develop branch in master and tag the release. |
| 34 | +- Merge this ``release-prep-v1.6.1`` branch in master after review approval |
| 35 | + and tag the release: |
24 | 36 |
|
25 | | - - ``git checkout master`` |
26 | | - - ``git merge develop`` |
27 | 37 | - ``git tag -a v1.6.1 -m "Release v1.6.1"`` |
28 | | - - ``git push --set-upstream origin master`` |
| 38 | + - ``git push --set-upstream origin release-prep-v1.6.1`` |
29 | 39 | - ``git push --set-upstream origin v1.6.1`` |
30 | 40 |
|
31 | | -- Draft a new release in GitHub, using the previous release blurb as a base. Highlight new and |
32 | | - noteworthy changes from the CHANGELOG.rst. |
33 | | - |
34 | | -Create Release on GitHub |
35 | | ------------------------- |
36 | | - |
37 | | -- Run ``etc/release/scancode_release.sh`` locally. |
| 41 | +Automated Release Process |
| 42 | +------------------------- |
38 | 43 |
|
39 | | -- Upload the release archives created in the ``dist/`` directory to the GitHub release page. |
| 44 | +- We have a `automated release script <https://github.com/nexB/scancode-toolkit/actions/workflows/scancode-release.yml>`_ |
| 45 | + triggered by a pushed tag, where jobs run to: |
40 | 46 |
|
41 | | -- Save the release as a draft. Use the previous release notes to create notes in the same style. |
42 | | - Ensure that the link to third-party source code is present. |
| 47 | + - Build pypi wheels and sdist archives |
| 48 | + - Build app release archives for linux/mac/windows |
| 49 | + - This happens for all supported python versions |
| 50 | + - Test these wheels and app archives in linux/mac/windows for all supported |
| 51 | + versions of python |
| 52 | + - Create a GitHub release (draft by default) with all wheels, sdists and app arcives |
| 53 | + (for all os/python combinations) |
| 54 | + - Upload sdists and wheels (all python versions) and publish a release |
| 55 | + (This won't be a stable release for beta/release-candidate tags) |
43 | 56 |
|
44 | | -- test the downloads. |
| 57 | +- Populate the draft GitHub release by clicking the ``Generate Release Notes`` button |
| 58 | + and this pre-populates the release notes with PRs and contributors. |
45 | 59 |
|
46 | | -- publish the release on GitHub |
| 60 | +- Add more details to the release notes talking about the key features and changes in the |
| 61 | + release. |
47 | 62 |
|
48 | | -Upload wheels to pypi and Test |
49 | | ------------------------------- |
| 63 | +- Publish the release on GitHub |
| 64 | + (Note the ``Set as a pre-release`` vs ``Set as the latest release`` checkboxes) |
50 | 65 |
|
51 | | -- then build and publish the released wheel on Pypi. For this you need your own Pypi credentials |
52 | | - (and get authorized to publish Pypi release: ask @pombredanne) and you need to have the ``twine`` |
53 | | - package installed and configured. |
| 66 | +- Announce in public channels and chats about the release |
54 | 67 |
|
55 | | - - Build a ``.whl`` and source distribution with ``python setup.py release`` |
56 | | - - Run twine with ``twine upload dist/`` |
57 | | - - Once uploaded check the published release at https://pypi.python.org/pypi/scancode-toolkit/ |
58 | | - - Then create a new fresh local virtualenv and test the wheel installation with: |
59 | | - ``pip install scancode-toolkit[full]`` |
| 68 | +- Do test the release archives yourself. |
0 commit comments