diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 78ad46b..e34b21f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,31 +1,2 @@ -stages: - - test - - deploy - -test: - extends: .npm.test - -deploy: - stage: deploy - image: jitesoft/node:latest - variables: - NODE_ENV: development - before_script: - - npm ci - script: - - npm i npm@6 - - ./node_modules/.bin/npm run build:prod - - mv dist/* ./ - - rm -rf dist - - ./node_modules/.bin/npm version ${CI_COMMIT_TAG} - - ./node_modules/.bin/npm publish --access public - only: - - tags - tags: - - protected - - npm - include: - - template: SAST.gitlab-ci.yml - - remote: https://gitlab.com/jitesoft/gitlab-ci-lib/raw/master/Scan/npm.yml - - remote: https://gitlab.com/jitesoft/gitlab-ci-lib/raw/master/JS/test.yml + - remote: https://gitlab.com/jitesoft/gitlab-ci-lib/raw/master/Auto/npm.yml diff --git a/package.json b/package.json index ff875b7..80f90cd 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ }, "scripts": { "test": "eslint src/ && jest yolog/tests/", - "build:prod": "cross-env NODE_ENV=production webpack", + "build:prod": "cross-env NODE_ENV=production webpack && mv dist/* ./", "build:dev": "cross-env NODE_ENV=development webpack" } }