From 70b54164cd6d7f6985956e21f0a7592a0d3e0e4e Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Fri, 17 May 2019 16:53:27 +0200 Subject: [PATCH] ci: add job to automatically publish package to npm Fixes #18 --- .gitlab-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11f58bfb..629cc19a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,9 @@ build: stage: build script: - npm run build + artifacts: + paths: + - lib audit: stage: test @@ -33,6 +36,21 @@ scheduled-audit: only: - schedules +package: + dependencies: + - build + tags: + - secrecy + stage: deploy + script: + - echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > /root/.npmrc + - npm publish + only: + - /^v[0-9]+\.[0-9]+\.[0-9]+$/ + artifacts: + paths: + - public + pages: stage: deploy script: