Skip to content
Snippets Groups Projects
.gitlab-ci.yml 604 B
Newer Older
---
include:
  project: infra/gitlab
  ref: master
  file: templates/nodejs.ci.yml

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - .npm/

default:
Benoit Alessandroni's avatar
Benoit Alessandroni committed
  image: node:18

stages:
  - prepare
  - publish

prepare:
  stage: prepare
Benoit Alessandroni's avatar
Benoit Alessandroni committed
  image: node:18
  before_script:
    - npm ci --cache .npm --prefer-offline
    - npm install -g semantic-release@v17.1 @semantic-release/gitlab@6.0.5
  script:
    - npm run build
  artifacts:
    when: on_success
    paths:
      - dist
    expire_in: 1 day
  tags:
    - test

publish:
  stage: publish
  extends: .publish_npm
  only:
    - master
    - beta