From 3c8d07ddd3e9b752444d0670738246d766b5dad8 Mon Sep 17 00:00:00 2001 From: "Julien M." Date: Tue, 14 Nov 2023 14:17:22 +0100 Subject: [PATCH] docs: how to manually deploy to PyPi --- docs/development/releasing.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/development/releasing.md b/docs/development/releasing.md index f3c0ea20..d152c9c7 100644 --- a/docs/development/releasing.md +++ b/docs/development/releasing.md @@ -5,3 +5,34 @@ 1. Commit changes with a message like `Bump version to X.x.x` to the main branch 1. Apply a git tag with the relevant version: `git tag -a 0.3.0 {git commit hash} -m "New awesome feature"` 1. Push commit and tag to main branch: `git push --tags` + +## Manual upload to PyPi + +> This method requires an API token on PyPi + +If the CI/CD fails for any reason, here comes the manual procedure: + +1. Install required packages: + + ```sh + python -m pip install -U build twine wheel + ``` + +1. Install package in editable mode: + + ```sh + python -m pip install -e . + ``` + +1. Clean previous builds and build package artifacts: + + ```sh + rm -rf dist/ + python -m build --no-isolation --sdist --wheel --outdir dist/ . + ``` + +1. Upload built artifacts to PyPi: + + ```sh + twine upload -u __token__ dist/* + ```