Add CICD for package

This commit is contained in:
Vincent BRIDIER 2023-03-29 09:36:48 +02:00
parent cf72fd1037
commit 8a2a7ba439
No known key found for this signature in database
GPG key ID: 8571BFA20420D512
2 changed files with 27 additions and 1 deletions

26
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,26 @@
include:
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/eslint.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/eslint.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'security/npm.yml'
deploy:
image: node:latest
stage: deploy
script:
- npm config set ldc-web:registry https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
- npm config set -- '//${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken' "${CI_JOB_TOKEN}"
- npm version --no-git-tag-version ${CI_COMMIT_TAG}
- npm publish
rules:
- if: $CI_COMMIT_TAG
stages:
- lint
- security
- deploy

View file

@ -1,5 +1,5 @@
{
"name": "ldc-web-cookie-notice",
"name": "@ldc-web/cookie-notice",
"version": "3.0.0",
"description": "LDC Web cookie notice for websites usage",
"main": "dist/ts/ldcweb-cookies.js",