diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 43e6c1cca946a822a6c1992f9a776b6ff9be465e..7794a27abcee82c739efa49bb925d66a95e8f944 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,11 +7,13 @@
 workflow:
   rules:
     - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+    - if: $CI_COMMIT_TAG
     
 variables:
 
 stages:
   - generation
+  - publication
         
 Word CR text:
   stage: generation
@@ -35,3 +37,21 @@ Word CR text:
     paths:
       - docs/
     expose_as: 'Word CR text'
+    
+Publish spec:
+  stage: publication
+  only:
+    - tags
+  before_script:
+    - |
+     curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/publish_spec%2Esh/raw?ref=publication" >> publish_spec.sh
+    - chmod +x publish_spec.sh
+    #- |
+    # curl "${CI_API_V4_URL}/projects/$TOOLS_SCRIPTS_PROJECT_ID/repository/files/onem2m_spec_template%2Edocx/raw?ref=master" >> onem2m_coversheet_template.docx
+  script:
+    - echo 'Publishing spec'
+    - ./publish_spec.sh ${CI_PROJECT_URL} ${CI_COMMIT_TAG} #onem2m_spec_template.docx
+  artifacts:
+    name: "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}"
+    paths:
+      - "${CI_PROJECT_NAME}_${CI_COMMIT_TAG}.docx"
\ No newline at end of file
diff --git a/publish_spec.sh b/publish_spec.sh
new file mode 100755
index 0000000000000000000000000000000000000000..41cbbdefd092b51bf9f6ef40f9ae2f34af2e8fea
--- /dev/null
+++ b/publish_spec.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+DOCKER_IMAGE=pandoc/core:3.0
+
+echo "\n------ Checking for docker image --------"
+docker pull "$DOCKER_IMAGE"
+
+echo "------ Removing previous outputs --------"
+rm **/*.docx
+
+echo "------ Parsing repo URL --------"
+
+HOST_URL=$(echo $1 | cut -d'/' -f 1-3)
+PROJECT_NAME=$(echo $1 | cut -d'/' -f 5- | cut -d'.' -f 1)
+echo "HOST URL:" $HOST_URL
+echo "PROJECT NAME:" $PROJECT_NAME
+echo "TAG NAME:" $2
+
+echo "------ Getting .md file(s) ------"
+# If there are no .md files, then simply exit
+ls | grep -q 'md'
+specs=$?
+if [ ! $specs ] ; then 
+    echo "-- No Markdown files."
+    exit 0
+fi
+
+for i in *.md ;  do
+	echo "\n------ Publishing spec --------" 
+	docker run --rm -v $(pwd):/data -u $(id -u):$(id -g) "$DOCKER_IMAGE" "/data/$i" -f markdown -t docx --reference-doc "Spec-template.docx" -o "${PROJECT_NAME}_${2}.docx" 
+done
+
+echo "\n------ Publishing spec --------" 
+
+exit 0
\ No newline at end of file