Commit 69bcb7e8 authored by Fred Chasen's avatar Fred Chasen

Merge branch 'ci/npm' into 'master'

Automatically publish on npm for each new git tag

See merge request tools/pagedjs!78
parents 76f4da9f 01d6d72a
before_script: stages:
- docker info - build
- publish
build_image: npm-test:
script: stage: build
- docker build -t pagedmedia/pagedjs . - docker build -t pagedmedia/pagedjs .
- docker run --security-opt 'seccomp=seccomp.json' pagedmedia/pagedjs npm test - docker run --security-opt 'seccomp=seccomp.json' pagedmedia/pagedjs npm test
# This job requires to setup GitLab the following way:
# 1. On
# create a new read/write token (the logged in user must have write access for the `pagedjs` package)
# 2. On
# add a new variable named `NPM_TOKEN`, and toggle on _Protected_ and _Masked_
# same as in Dockerfile's FROM stanza
image: node:12-stretch
stage: publish
- 'echo "//${NPM_TOKEN}" > ~/.npmrc'
- npm publish --public --dry-run
- npm publish --public
- tags
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment