From 80c8d75ce9d96418ebed5c5c18f26b7f614e90a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Corn=C3=A9=20Lukken?= <lukken@astron.nl>
Date: Wed, 12 Mar 2025 14:51:42 +0000
Subject: [PATCH] Add job to publish to pypi

---
 .gitlab-ci.yml | 11 ++++-------
 setup.cfg      |  5 ++---
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a569ef8..1660dd8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -192,13 +192,10 @@ publish_on_pypi:
     - if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"'
   script:
     - echo "run twine for pypi"
-    # - |
-    #   TWINE_PASSWORD=${PIPY_TOKEN} \
-    #   TWINE_USERNAME=${PIPY_USERNAME} \
-    # TODO: replace URL with a pipy URL
-    #   python -m twine upload \
-    #   --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
-    - exit 1
+    - |
+      TWINE_PASSWORD="${PYPI_TOKEN}" \
+      TWINE_USERNAME="__token__" \
+      python -m twine upload dist/*
 
 publish_to_readthedocs:
   stage: publish
diff --git a/setup.cfg b/setup.cfg
index a303484..1339e4c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,7 @@ url = https://git.astron.nl/lofar2.0/cryptocoryne
 license = Apache License 2.0
 classifiers =
     Development Status :: 3 - Alpha
-    Environment :: Web Environment
+    Environment :: No Input/Output (Daemon)
     Intended Audience :: Developers
     Intended Audience :: Science/Research
     License :: OSI Approved :: Apache Software License
@@ -19,8 +19,7 @@ classifiers =
     Programming Language :: Python :: 3.10
     Programming Language :: Python :: 3.11
     Programming Language :: Python :: 3.12
-    Topic :: Internet :: WWW/HTTP
-    Topic :: Internet :: WWW/HTTP :: Dynamic Content
+    Topic :: Security
     Topic :: Scientific/Engineering
     Topic :: Scientific/Engineering :: Astronomy
 
-- 
GitLab