Skip to content

Instantly share code, notes, and snippets.

@marcguilera
Created February 17, 2019 12:08
Show Gist options
  • Save marcguilera/7700528c6d000a3f914bc8986b228eaa to your computer and use it in GitHub Desktop.
Save marcguilera/7700528c6d000a3f914bc8986b228eaa to your computer and use it in GitHub Desktop.
tools.build.semantic-release/pipelines/.release-step.yml
.semantic-release:
stage: semantic-release
image: registry.gitlab.com/you/tools.build.semantic-release/semantic-release-builder
variables:
SEMANTIC_RELEASE_VERIFY_CONDITIONS: >-
@semantic-release/changelog,
@semantic-release/git,
@semantic-release/gitlab
SEMANTIC_RELEASE_ANALIZE_COMMITS: >-
@semantic-release/commit-analyzer
SEMANTIC_RELEASE_GENERATE_NOTES: >-
@semantic-release/release-notes-generator
SEMANTIC_RELEASE_PREPARE: >-
@semantic-release/changelog,
@semantic-release/git
SEMANTIC_RELEASE_PUBLISH: >-
@semantic-release/gitlab
SEMANTIC_RELEASE_SUCCESS: ""
SEMANTIC_RELEASE_FAIL: ""
script:
- |
if [ ! -f .releaserc ]; then
npx semantic-release \
--verify-conditions $SEMANTIC_RELEASE_VERIFY_CONDITIONS \
--analyze-commits $SEMANTIC_RELEASE_ANALIZE_COMMITS \
--generate-notes $SEMANTIC_RELEASE_GENERATE_NOTES \
--prepare $SEMANTIC_RELEASE_PREPARE \
--publish $SEMANTIC_RELEASE_PUBLISH \
--success $SEMANTIC_RELEASE_SUCCESS \
--fail $SEMANTIC_RELEASE_FAIL
else
npx semantic-release
fi
only:
refs:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment