You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
867 B

stages:
- build
- publish
npm-test:
stage: build
before_script:
- docker build -t pagedmedia/pagedjs .
script:
- docker run --ipc=host pagedmedia/pagedjs npm test
- docker run --ipc=host pagedmedia/pagedjs npm run specs
# This job requires to setup GitLab the following way:
# 1. On https://www.npmjs.com/settings/tokens/create
# create a new read/write token (the logged in user must have write access for the `pagedjs` package)
# 2. On https://gitlab.pagedmedia.org/tools/pagedjs/-/settings/ci_cd#js-cicd-variables-settings
# add a new variable named `NPM_TOKEN`, and toggle on _Protected_ and _Masked_
npm-publish:
stage: publish
before_script:
- 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
- npm install
- npm publish --public --dry-run
script:
- npm publish --public
only:
- tags