From 2c4159f90ad0918744133fc4dd86fa8a0cf68569 Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio@bekerle.com>
Date: Tue, 1 Dec 2020 13:42:55 +0100
Subject: [PATCH] Add publishing documentation (#36)

---
 .gitlab-ci.yml | 7 ++++---
 README.md      | 7 +++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 96dad6fa..892ef337 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,9 +18,10 @@ test:
 
 publish:
   stage: publish
-#  only:
-#    refs:
-#      - publish
+  only:
+    refs:
+      - publish
+      - master
   script:
     - sudo npm install --global can-npm-publish
     - yarn config set registry https://registry.npmjs.org/
diff --git a/README.md b/README.md
index 57441c84..e1bb8586 100644
--- a/README.md
+++ b/README.md
@@ -20,3 +20,10 @@ yarn install
 
 * `yarn run test` -  Run test for all packages
 * `yarn run clean` - Removes all `node_modules` directories.
+
+## Publishing packages to npmjs.com
+
+There is an automatic publishing process initiated for each package if code is pushed
+to the `master` branch, if the package isn't set to private in its `package.json` and
+the version number in its `package.json` is higher than the version number on npmjs.com.
+
-- 
GitLab