From c6e6e25862b5ad66de38971e15dfe5b990131045 Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Wed, 15 Nov 2023 21:58:00 +0200 Subject: [PATCH] Add publishing capability to CI * Not yet enabled automatically due to gentoolkit Signed-off-by: Alfred Wingate --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ff6027..ae28019 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,3 +23,14 @@ pre-commit: - pip install pre-commit - pre-commit run --all-files +publish: + variables: + TWINE_PASSWORD: ${CI_JOB_TOKEN} + TWINE_USERNAME: gitlab-ci-token + TWINE_REPOSITORY_URL: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi + TWINE_NON_INTERACTIVE: 1 + when: manual # gentoolkit as a dependency blocks publishing for now + script: + - pip install build twine + - python -m build + - python -m twine upload --verbose dist/*