Skip to content

Commit e34eeeb

Browse files
committed
Update CONTRIBUTING.rst
mods for Github workflow -> PyPi release handling
1 parent 3a85d01 commit e34eeeb

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

CONTRIBUTING.rst

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,39 @@ whatever you need with ``uv run``.
6262
Creating a New Release
6363
^^^^^^^^^^^^^^^^^^^^^^
6464

65-
New releases are made using the following steps:
65+
It is proposed to perform these steps for creating a new release:
6666

6767
#. Bump version number in ``sfs/__init__.py``
6868
#. Update ``NEWS.rst``
6969
#. Commit those changes as "Release x.y.z"
7070
#. Create an (annotated) tag with ``git tag -a x.y.z``
71-
#. Clear the ``dist/`` directory
72-
#. Create a source distribution with ``python3 setup.py sdist``
73-
#. Create a wheel distribution with ``python3 setup.py bdist_wheel``
74-
#. Check that both files have the correct content
75-
#. Upload them to PyPI_ with twine_: ``python3 -m twine upload dist/*``
76-
#. Push the commit and the tag to Github and `add release notes`_ containing a
77-
link to PyPI and the bullet points from ``NEWS.rst``
71+
#. Push the commit and the tag to Github
72+
#. Github workflow publish.yml will handle the build and upload to PyPi
73+
#. `Add release notes`_ containing a link to PyPI and the bullet points
74+
from ``NEWS.rst``
7875
#. Check that the new release was built correctly on RTD_
79-
and select the new release as default version
76+
and select the new release as the default version
77+
78+
Alternatively, an extra branch and PR can be utilised as follows:
79+
80+
#. Create a branch from the current master branch state. In this new branch:
81+
#. Bump version number in ``sfs/__init__.py``
82+
#. Update ``NEWS.rst``
83+
#. Commit those changes as "Release x.y.z", push this commit and make a PR.
84+
This will trigger workflows to check that everything is fine, the PR is a
85+
nice additional documentation of this release process.
86+
#. Create an (annotated) tag with ``git tag -a x.y.z`` and push it
87+
#. Due to this tag push Github workflow publish.yml will handle the build
88+
and upload to PyPi
89+
#. Merge the PR by ``git merge branch_name --ff-only``. This is needed for
90+
preserving the release and tag commits as they need to appear exactly this
91+
way in the master branch history.
92+
#. Delete the branch
93+
#. `Add release notes`_ containing a link to PyPI and the bullet points
94+
from ``NEWS.rst``
95+
#. Check that the new release was built correctly on RTD_
96+
and select the new release as the default version
97+
8098

81-
.. _twine: https://twine.readthedocs.io/
8299
.. _add release notes: https://github.com/sfstoolbox/sfs-python/tags
83100
.. _RTD: https://readthedocs.org/projects/sfs-python/builds/

0 commit comments

Comments
 (0)