Skip to content
Snippets Groups Projects
Commit a9441a51 authored by Shibin Das's avatar Shibin Das
Browse files

Add .gitlab-ci.yml

parent fc60f800
No related branches found
No related tags found
No related merge requests found
Pipeline #1011 failed
include:
- template: Security/Dependency-Scanning.gitlab-ci.yml
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: $CI_MERGE_REQUEST_IID
- if: '$CI_PIPELINE_SOURCE == "push"'
image: node:current-alpine3.13
stages:
- lint
- test
- release
cache:
key: ${CI_JOB_NAME}-cache-1611917650
paths:
- node_modules
lint:
rules:
- if: $CI_MERGE_REQUEST_IID
- if: '$CI_PIPELINE_SOURCE == "push"'
stage: lint
before_script:
- npm install
script:
- npm run lint
audit:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: $CI_MERGE_REQUEST_IID
- if: '$CI_PIPELINE_SOURCE == "push"'
stage: test
script:
- npm audit --audit-level=low
release:
stage: release
rules:
- if: '$CI_COMMIT_TAG =~ /^v/'
before_script:
- echo '@drupal:registry=https://registry.npmjs.org/' > ~/.npmrc
- echo '//registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}' >> ~/.npmrc
script:
- npm install
- npm version $(echo ${CI_COMMIT_TAG} | cut -c2-) --no-git-tag-version
- npm run build
- npm publish --access public
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment