Skip to content
Snippets Groups Projects
Verified Commit a4860988 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

Add gitlab release tooling

This patch should provide the needed tooling to automatically also
create a gitlab release for each version.
parent 6b5af021
No related branches found
No related tags found
No related merge requests found
Pipeline #6247 passed
...@@ -31,3 +31,21 @@ publish: ...@@ -31,3 +31,21 @@ publish:
- yarn publish --new-version "$CI_COMMIT_TAG" - yarn publish --new-version "$CI_COMMIT_TAG"
rules: rules:
- if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_TAG'
gitlab-release:
stage: publish
image: registry.gitlab.com/gitlab-org/release-cli
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
before_script:
- apk add --no-cache git
- export RELEASE_NAME="Markdown Spellchecker $CI_COMMIT_TAG"
- export RELEASE_DESCRIPTION="$(printf '## Changelog\n\n' && git log --no-merges --pretty="- %s (%h)" "HEAD...$(git tag | sort -V -r | head -1)" && printf '\n\n## External Contributors\n\n' && git log --pretty="- %an%n- %cn" HEAD...$(git tag | sort -V -r | head -1) | sort | uniq | grep -v 'Sheogorath' && printf "\n\n---\n*This is an automated release. See [#${CI_JOB_ID}]($CI_JOB_URL) for details.*")"
script:
- >
release-cli create --name "$RELEASE_NAME" --description "$RELEASE_DESCRIPTION"
--tag-name "${CI_COMMIT_TAG}" --ref "$CI_COMMIT_SHA"
rules:
- if: '$CI_COMMIT_TAG'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment