Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use twine+build for publishing #42

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading