From d9eb96c33708cb4a670b501e8a565e75a6ad41be Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Tue, 9 Jan 2024 16:49:01 +0100
Subject: [PATCH] publish package

---
 .gitlab-ci.yml | 9 +++++++++
 setup.cfg      | 3 +--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4e72c04..6d86016 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,3 +31,12 @@ test:
     paths:
       - htmlcov
     expire_in: 1 week
+
+upload:
+  stage: deploy
+  needs: ['test', ]
+  image: python:latest
+  script:
+    - pip install "setuptools>=62.6" twine
+    - python setup.py sdist
+    - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
diff --git a/setup.cfg b/setup.cfg
index e76e3de..a8edc3a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,5 +25,4 @@ classifiers =
 include_package_data = true
 packages = find:
 python_requires = >=3.6
-install_requires =
-    Django >= 3.2  # Replace "X.Y" as appropriate
\ No newline at end of file
+install_requires = file: requirements.txt
\ No newline at end of file
-- 
GitLab