Last active
January 1, 2021 18:49
-
-
Save constgen/f22186b160d0fb6b8472bd83252ba0d5 to your computer and use it in GitHub Desktop.
GitLab publish to NPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:12 | |
cache: | |
paths: | |
- node_modules/ | |
stages: | |
- setup | |
- test | |
- deploy | |
install: | |
stage: setup | |
script: | |
- npm install | |
after_script: | |
- npm run postinstall | |
test: | |
stage: test | |
script: | |
- npm run test | |
publish: | |
stage: deploy | |
only: | |
- tags | |
# - triggers | |
except: | |
- branches | |
before_script: | |
# - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | |
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}">.npmrc | |
script: | |
- npm publish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment