diff --git a/.gitignore b/.gitignore
index 3721edee64eb6b7149fe861354bd18cbbc09152c..09a73bb9e3010253985d0e22d6de55b6af41bb80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
 build
+*.deb
+*.zip
 **/config.cpp
-**/config.h
\ No newline at end of file
+**/config.h
+_CPack_Packages
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 18bd6da28fa7a66ac86dc94eb2dc86364ce31eed..8359363d4b689a56febdd46cceaf0cd43c5f20e8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,7 @@ stages:
   - build
   - test
   - pack
+  - release
 
 flawfinder-sast:
   stage: static
@@ -129,7 +130,7 @@ linux:pack:
   artifacts:
     when: always
     paths:
-      - build/*.deb
+      - *.deb
     expire_in: 1 week
 
 ### Windows
@@ -207,5 +208,25 @@ windows:pack:
   artifacts:
     when: always
     paths:
-      - build/*.zip
+      - *.zip
     expire_in: 1 week
+
+# Release
+
+release_job:
+  stage: release
+  rules:
+    - if: $CI_COMMIT_TAG                  # Run this job when a tag is created manually
+  script:
+    - echo "running release_job"
+  needs:
+    - job: windows:pack
+      artifacts: true
+    - job: linux:pack
+      artifacts: true
+  
+  release:
+    name: 'Release $CI_COMMIT_TAG'
+    description: 'Automatic CI Release'
+    tag_name: '$CI_COMMIT_TAG'                                       # elsewhere in the pipeline.
+    ref: '$CI_COMMIT_TAG'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03b0a70483ff70509ce62e7aff77c46577d48ed1..14523cb787ce39db39e7a49141126a192fe2a068 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ include (CheckIncludeFile)
 include (CheckIncludeFileCXX)
 include (CheckFunctionExists)
 
-if (NOT FTL_VERSION OR FTL_VERSION STREQUAL "$Env:CI_COMMIT_TAG")
+if (NOT FTL_VERSION)
 	set(FTL_VERSION 0.0.1)
 endif()
 
diff --git a/cmake/ftl_CPack.cmake b/cmake/ftl_CPack.cmake
index 47261558cce7d45f200029020698047c8307e914..e340a2662182441dee91710ee8d5351668185019 100644
--- a/cmake/ftl_CPack.cmake
+++ b/cmake/ftl_CPack.cmake
@@ -2,6 +2,7 @@
 string(TIMESTAMP BUILD_TIME "%Y%m%d")
 set(CPACK_PACKAGE_VERSION_PATCH "${BUILD_TIME}")
 set(CPACK_PACKAGE_NAME "libftl-protocol")
+set(CPACK_PACKAGE_DIRECTORY "${CMAKE_SOURCE_DIR}")
 set(CPACK_DEBIAN_PACKAGE_NAME "FTL Protocol Library")
 set(CPACK_PACKAGE_VENDOR "University of Turku")
 set(CPACK_PACKAGE_DESCRIPTION "Networking and streaming library for FTL data")