simplify .gitlab-ci.yml

pull/2/head
Timothée Rebours 4 years ago
parent a182f5148e
commit 97a9a42ecb
  1. 12
      .gitlab-ci.yml

@ -1,5 +1,4 @@
stages: stages:
- lint
- test - test
- test-browser - test-browser
- deploy - deploy
@ -8,8 +7,6 @@ image: node:14
before_script: before_script:
- echo "//registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}" > .npmrc - echo "//registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}" > .npmrc
- echo "@seald-io:registry=https://registry.npmjs.org/" >> .npmrc
- echo "@seald-io:always-auth=true" >> .npmrc
- npm ci --cache .npm --prefer-offline - npm ci --cache .npm --prefer-offline
cache: cache:
@ -17,13 +14,11 @@ cache:
paths: paths:
- .npm/ - .npm/
lint:
stage: lint
script: npm run lint
test: test:
stage: test stage: test
script: npm run test script:
- npm run lint
- npm run test
test-browser: test-browser:
image: nexus-docker.tardis.seald.io/seald/docker-browser-testing:CHROME_88 image: nexus-docker.tardis.seald.io/seald/docker-browser-testing:CHROME_88
@ -33,6 +28,7 @@ test-browser:
deploy: deploy:
stage: deploy stage: deploy
script: script:
- npm run prepublishOnly
- if (npx semver $CI_COMMIT_TAG --range '>0.0.0'); then NPM_TAG=latest; else NPM_TAG=beta; fi; # Using the fact that semver by default considers that pre-releases do not respect stable ranges - if (npx semver $CI_COMMIT_TAG --range '>0.0.0'); then NPM_TAG=latest; else NPM_TAG=beta; fi; # Using the fact that semver by default considers that pre-releases do not respect stable ranges
- npm publish --tag=$NPM_TAG --access public - npm publish --tag=$NPM_TAG --access public
only: only:

Loading…
Cancel
Save