diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 41a860ac6862997a29eab8a0bf6180062bb80edd..1d23e801617e6089cbc4e2b0387d358821ca1079 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,6 +42,7 @@ build_package:
   stage: build
   script:
     - pip install -r requirements.txt
+    - sed -i "s_VERSION_0.0.1_g" setup.cfg
     - python -m build
   artifacts:
     paths:
@@ -55,4 +56,6 @@ publish_package:
   stage: publish
   script:
     - pip install twine
+    - VER=${CI_COMMIT_TAG#*-}
+    - sed -i "s_VERSION_${VER}_g" setup.cfg
     - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
diff --git a/setup.cfg b/setup.cfg
index 0ffa9768fa9bc196a080db1fab5b1d097251704a..c95882bbec2bd3de4e29221938e13b0673ca1f34 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = airflow_datacat_integration
-version = 0.0.1
+version = VERSION
 author = Christian Boettcher
 author_email = c.boettcher@fz-juelich.de
 description = Datacatalog Integration for Apache Airflow