diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f216d72ba8f5a50e73548617279d9f6b2435a49..f5776d3b846339b8e5139b86aaa03691ff09a339 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 stages:
   - test
+  - release
 
 test:
   image: dbogatov/docker-sources:node--14.4-alpine3.12
@@ -10,3 +11,15 @@ test:
   coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
   tags:
     - docker
+
+release:
+  stage: release
+  script:
+    - |
+      cat <<EOT >> .npmrc
+      @dbogatov:registry=https://${CI_SERVER_HOST}/api/v4/packages/npm/
+      //${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}
+      //${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}
+      EOT
+    - cat .npmrc
+    - npm publish
diff --git a/package.json b/package.json
index fc075b1636089708b77b9fc74b95f1ac2b682eac..34aa4578032460c631ff5f167ecdf250da0c8492 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,9 @@
 		"test": "mocha -r ts-node/register test/**/*.ts",
 		"coverage": "nyc --reporter=html --reporter=cobertura --reporter=text -e .ts -n \"src/**/*.ts\" -x \"test/**/*.ts\" npm run test"
 	},
+	"publishConfig": {
+		"@dbogatov:registry": "https://git.dbogatov.org/api/v4/projects/227/packages/npm/"
+	},
 	"repository": {
 		"type": "git",
 		"url": "https://git.dbogatov.org/dbogatov/broken-links-inspector.git"