Files
openstapps/.gitlab-ci.yml
Karl-Philipp Wulfert d9c4ce48dc feat: add automatic publishing
Fixes #6
2019-05-23 13:53:10 +02:00

72 lines
972 B
YAML

image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
before_script:
- npm install
stages:
- build
- test
- deploy
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
test:
stage: test
script:
- npm test
artifacts:
paths:
- coverage
audit:
stage: test
script:
- npm audit
except:
- schedules
allow_failure: true
scheduled-audit:
stage: test
script:
- npm 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:
- lib
pages:
stage: deploy
script:
- npm run documentation
- mv docs public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
artifacts:
paths:
- public