diff --git a/Makefile b/Makefile index 6850188..ad777ce 100644 --- a/Makefile +++ b/Makefile @@ -29,5 +29,14 @@ major: bump: @bumpversion ${BUMP} -release: clean - @python setup.py -q sdist upload +setup_build: + @pipenv run pip install twine build + +build: clean + @pipenv run python -m build + +upload_test: build + @pipenv run twine upload -r testpypi dist/* + +release: build + @pipenv run twine upload -r django-thumbor dist/* diff --git a/README.rst b/README.rst index b2b23ac..d9d8c43 100644 --- a/README.rst +++ b/README.rst @@ -201,3 +201,27 @@ Test Server - Run thumbor: ``thumbor`` - Run local server: ``make run`` - visit `http://127.0.0.1:8000/ `_: + +Releasing +--------- + +Refer to the `.pypirc reference `_ +for details on setting up API tokens. + +Install ``build`` to build a package and ``twine`` to upload: + +.. code-block:: bash + + make setup_build + +Upload to the `test server `_: + +.. code-block:: bash + + make upload_test + +If everything goes well, release to the real PyPI server: + +.. code-block:: bash + + make release