Created
March 17, 2020 14:18
-
-
Save yyynnn/a04d2575d7e89fbd5432c17fb887cbcb to your computer and use it in GitHub Desktop.
gitlab-ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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