- Create a PyPI account at https://pypi.org/account/register/
- Create an API token at https://pypi.org/manage/account/token/
- Scope: "Entire account" or "Project: toobuff"
- Save the token (starts with
pypi-)
poetry config pypi-token.pypi your-pypi-token-hereOr set it as an environment variable:
export POETRY_PYPI_TOKEN_PYPI=your-pypi-token-herepoetry buildThis creates dist/toobuff-0.1.0.tar.gz and a wheel file.
poetry publishThis will upload to PyPI. The package will be available at: https://pypi.org/project/toobuff/
After publishing, test that it works:
pipx install toobuff
toobuff --versionOnce published, the install script at install.sh will work. Make sure it's committed to your main branch so the curl command works:
curl -fsSL https://raw.githubusercontent.com/aditya-arolkar-swe/too_buff_cli/main/install.sh | bashWhen you want to release a new version:
- Update
versioninpyproject.toml - Build and publish:
poetry build poetry publish
- Test your package locally first:
pip install dist/toobuff-*.whl - The first publish creates the project on PyPI
- Subsequent publishes update the existing project
- PyPI doesn't allow re-uploading the same version, so increment version for each release