@@ -8,59 +8,39 @@ Versions are derived automatically from git tags.
88.. _setuptools-scm : https://github.com/pypa/setuptools-scm
99
1010
11- Version
12- -------
11+ Relative bump
12+ -------------
1313
14- ``main `` should always be green and a potential release candidate.
15- ``unittest2pytest `` follows semantic versioning, so given that the
16- current version is ``X.Y.Z ``, to find the next version number one
17- needs to look at the ``CHANGELOG.rst `` file:
14+ Run the **Release ** workflow, selecting the version bump type:
1815
19- - If there any new feature, then we must make a new **minor ** release:
20- next release will be ``X.Y+1.0 ``.
16+ .. code-block :: console
2117
22- - Otherwise it is just a ** bug fix ** release: `` X.Y.Z+1 ``.
18+ gh workflow run release.yml -R pytest-dev/unittest2pytest --field bump=minor
2319
20+ Options: ``major ``, ``minor ``, ``micro ``, ``post ``. The version is
21+ computed automatically from the latest git tag.
2422
25- Steps
26- -----
2723
28- To publish a new release ``X.Y.Z ``, the steps are as follows:
24+ Absolute version
25+ ----------------
2926
30- #. Update `` CHANGELOG.rst `` :
27+ To release a specific version (e.g. a release candidate) :
3128
32- .. code-block :: console
29+ .. code-block :: console
3330
34- python make_changelog.py X.Y.Z
31+ gh workflow run release.yml -R pytest-dev/unittest2pytest --field version=1.0rc1
3532
36- This replaces the ``UNRELEASED `` section with a dated ``X.Y.Z ``
37- section. Review the result and add any missing entries before
38- committing.
3933
40- #. Commit and push:
34+ What the workflow does
35+ ----------------------
4136
42- .. code-block :: console
43-
44- git commit -am "Prepare release X.Y.Z"
45- git push origin main
46-
47- #. Tag and push:
48-
49- .. code-block :: console
50-
51- git tag -s vX.Y.Z -m "unittest2pytest X.Y.Z"
52- git push origin vX.Y.Z
53-
54- Pushing the tag triggers the CI workflow, which builds, tests,
55- publishes to PyPI, and creates a GitHub release.
56-
57- #. Start the next development cycle:
58-
59- .. code-block :: console
60-
61- python make_changelog.py UNRELEASED
62- git commit -am "Start next development cycle"
63- git push origin main
37+ #. Runs ``scripts/make_changelog.py `` to replace the ``UNRELEASED `` section
38+ with the version number and today's date.
39+ #. Commits, tags, and pushes.
40+ #. Builds the package.
41+ #. Creates a GitHub Release with the built artifacts.
42+ #. Publishes to PyPI (requires the ``release `` environment).
43+ #. Runs ``scripts/make_changelog.py UNRELEASED `` and pushes a follow-up commit.
6444
6545
6646How versioning works
0 commit comments