diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..30459db7ababa9916914d42e85e85236040e4c48
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,32 @@
+stages:
+  - build
+  - publish
+
+before_script:
+  - export GRADLE_USER_HOME=`pwd`/.gradle
+
+cache:
+  paths:
+    - .gradle/wrapper
+    - .gradle/caches
+
+build:
+  image: openjdk:8
+  stage: build
+  script:
+    - ./gradlew --console=plain --no-daemon assemble jar
+  artifacts:
+    paths:
+      - "jastadd2.jar"
+    expire_in: 1 week
+
+publish:
+  image: openjdk:8
+  stage: publish
+  needs:
+    - test
+  script:
+    - "./gradlew publish"
+  only:
+    - dev
+    - master
diff --git a/build.gradle b/build.gradle
index 53744c4455d0c664b8ca5aba53dc2a9215ea18e6..5c6ed5850a199e9dd88211732f8dd218355b552c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,6 +2,8 @@ apply plugin: 'java'
 apply plugin: 'application'
 apply plugin: 'maven'
 apply plugin: 'signing'
+apply plugin: 'maven-publish'
+
 
 defaultTasks 'jar'
 
@@ -406,3 +408,36 @@ if (project.hasProperty('ossrhUsername')) {
 		}
 	}
 }
+
+version = fullVersion + "-dresden"
+//187
+publishing {
+    publications {
+        maven(MavenPublication) {
+            // artifactId = 'ragconnect'
+            artifact("jastadd2.jar") {
+                extension 'jar'
+            }
+        }
+    }
+    repositories {
+        maven {
+            url "https://git-st.inf.tu-dresden.de/api/v4/projects/187/packages/maven"
+            // Uncomment the following lines to publish manually (and comment out the other credentials section)
+//            credentials(HttpHeaderCredentials) {
+//                name = "Private-Token"
+//                value = gitLabPrivateToken // the variable resides in ~/.gradle/gradle.properties
+//            }
+            credentials(HttpHeaderCredentials) {
+                name = 'Job-Token'
+                value = System.getenv("CI_JOB_TOKEN")
+            }
+            authentication {
+                header(HttpHeaderAuthentication)
+            }
+        }
+
+    }
+}
+
+publish.dependsOn jar