Skip to content

Instantly share code, notes, and snippets.

@yyynnn
Created March 17, 2020 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yyynnn/a04d2575d7e89fbd5432c17fb887cbcb to your computer and use it in GitHub Desktop.
Save yyynnn/a04d2575d7e89fbd5432c17fb887cbcb to your computer and use it in GitHub Desktop.
gitlab-ci.yml
stages:
- stage:release
# This version is important! See https://github.com/semantic-release/gitlab/issues/139
image: node:12.14.1
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- node_modules/
# This selects only refs matching master
.only_semantic_release: &only_semantic_release
only:
- master
step:release:semantic_release:
<<: *only_semantic_release
when: manual
stage: stage:release
before_script:
- git config --global user.name "${GITLAB_USER_NAME}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
- echo "$GITLAB_USER_EMAIL"
- echo "$GITLAB_USER_NAME"
- echo "$CI_GIT_TOKEN"
script:
- npm i --non-interactive --pure-lockfile
- npm run semantic-release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment