Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pagedjs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume
pagedjs
Commits
01d6d72a
Commit
01d6d72a
authored
Nov 19, 2019
by
Thomas Parisot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically publish on npm for each new git tag
parent
b09521b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
.gitlab-ci.yml
.gitlab-ci.yml
+24
-4
No files found.
.gitlab-ci.yml
View file @
01d6d72a
before_script
:
-
docker info
stages
:
-
build
-
publish
build_image
:
script
:
npm-test
:
stage
:
build
before_script
:
-
docker build -t pagedmedia/pagedjs .
script
:
-
docker run --security-opt 'seccomp=seccomp.json' pagedmedia/pagedjs npm test
# 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
:
# same as in Dockerfile's FROM stanza
image
:
node:12-stretch
stage
:
publish
before_script
:
-
'
echo
"//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
>
~/.npmrc'
-
npm publish --public --dry-run
script
:
-
npm publish --public
only
:
-
tags
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment