diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8eda77e96f3f98d4078e9c52ebfd22e58f37ba72..647d508a1d1631626df1419087760771a7ca59c2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -583,7 +583,7 @@ release-libs:
   image: docker.io/python:3.11-alpine
   only:
     refs:
-      - /^release-[0-9]+.*/
+      - /^release-.*/
   variables:
     PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile"
   script:
@@ -591,8 +591,5 @@ release-libs:
     - pip install pipenv
     - pipenv install gunicorn && pipenv install --dev --system --deploy
     - pip install twine build
-    - 'sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" ./lib/python/pyproject.toml ./lib/python/setup.py ./lib/python/README.md'
-    - python -m build --sdist ./lib/python
-    - python -m build --wheel ./lib/python
-    - cat ${CI_PIPYRC} | base64 -d > .pypirc
-    - python -m twine upload --config-file .pypirc --verbose --repository pypi ./lib/python/dist/dbrepo-*
\ No newline at end of file
+    - ./lib/python/package.sh
+    - ./lib/python/release.sh
\ No newline at end of file
diff --git a/bin/test.sh b/bin/test.sh
deleted file mode 100755
index 765ecaf6b7e2741a5e18d33f29071309d053de16..0000000000000000000000000000000000000000
--- a/bin/test.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-mvn -f ./dbrepo-metadata-service/pom.xml clean install -DskipTests
-# test java services
-mvn -f ./dbrepo-metadata-service/pom.xml clean test verify
-mvn -f ./dbrepo-data-service/pom.xml clean test verify
-# test python services
-bash ./dbrepo-analyse-service/test.sh
-bash ./dbrepo-search-service/test.sh
-# test ui
-yarn --cwd ./dbrepo-ui install
-yarn --cwd ./dbrepo-ui run test:unit
-yarn --cwd ./dbrepo-ui run coverage
\ No newline at end of file
diff --git a/lib/python/Makefile b/lib/python/Makefile
deleted file mode 100644
index 4b9e18e3ad41ffb55f452553cf57ff923463059e..0000000000000000000000000000000000000000
--- a/lib/python/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-all:
-
-clean:
-	rm -rf ./python/dist/* ./docs/build/* ./dist/*
-
-install:
-	pipenv install
-
-docs: clean
-	sphinx-apidoc -o ./docs/source ./dbrepo
-	sphinx-build -M html ./docs/ ./docs/build/
-
-check:
-	python3 ./python/setup.py develop
-
-build: clean
-	python3 -m build --sdist .
-	python3 -m build --wheel .
-
-deploy: build
-	python3 -m twine upload --config-file ~/.pypirc --verbose --repository pypi ./dist/dbrepo-*
-
-deploy-test: build
-	python3 -m twine upload --config-file ~/.pypirc --verbose --repository testpypi ./dist/dbrepo-*
-
-FORCE: ;
\ No newline at end of file
diff --git a/lib/python/build.sh b/lib/python/build.sh
deleted file mode 100644
index 802067b6beb9c11b6f34f703a2f1a8257fba5d3a..0000000000000000000000000000000000000000
--- a/lib/python/build.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-# needed for MariaDB Connector/C
-apt update && apt install -y curl gcc libmariadb3 libmariadb-dev
-
-python3 -m venv ./lib/python/venv
-source ./lib/python/venv/bin/activate
-PIPENV_PIPFILE=./lib/python/Pipfile pipenv install --dev
\ No newline at end of file
diff --git a/lib/python/package.sh b/lib/python/package.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4478dbf962d7dba47fc787061b5761d2b53a68eb
--- /dev/null
+++ b/lib/python/package.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+PRE_RELEASE=""
+if [ "${CI_COMMIT_BRANCH:8:8}" = "master" ]; then
+    PRE_RELEASE="rc${CI_PIPELINE_ID}"
+fi
+sed -i -e "s/__APPVERSION__/${APP_VERSION}${PRE_RELEASE}/g" ./lib/python/pyproject.toml ./lib/python/setup.py ./lib/python/README.md
+python -m build --sdist ./lib/python
+python -m build --wheel ./lib/python
diff --git a/lib/python/release.sh b/lib/python/release.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5e2b32683188c63d1c7fe36a80bbdfce6728ff45
--- /dev/null
+++ b/lib/python/release.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+cat ${CI_PIPYRC} | base64 -d > .pypirc
+python -m twine upload --config-file .pypirc --verbose --repository pypi ./lib/python/dist/dbrepo-*