Skip to content

Commit

Permalink
Changed to auto-build.
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Tegnér <[email protected]>
  • Loading branch information
Johannestegner committed Nov 2, 2020
1 parent 5b23f53 commit f8fa2a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
31 changes: 1 addition & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit f8fa2a8

Please sign in to comment.