Skip to content

Commit

Permalink
Use twine+build for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ricobl committed Apr 28, 2024
1 parent 508eabc commit fed8cab
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Expand Up @@ -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/*
24 changes: 24 additions & 0 deletions README.rst
Expand Up @@ -201,3 +201,27 @@ Test Server
- Run thumbor: ``thumbor``
- Run local server: ``make run``
- visit `http://127.0.0.1:8000/ <http://127.0.0.1:8000/>`_:

Releasing
---------

Refer to the `.pypirc reference <https://packaging.python.org/en/latest/specifications/pypirc/#pypirc>`_
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 <https://packaging.python.org/en/latest/guides/using-testpypi/>`_:

.. code-block:: bash
make upload_test
If everything goes well, release to the real PyPI server:

.. code-block:: bash
make release

0 comments on commit fed8cab

Please sign in to comment.