Compare commits

...

2 Commits

Author SHA1 Message Date
Nico Jensch f0d5ef4331
docs: add badges 2023-11-19 15:05:19 +01:00
Nico Jensch 550e227698
ci: automate releases via pushing tags 2023-11-19 14:34:33 +01:00
3 changed files with 29 additions and 5 deletions

6
.cz.yaml Normal file
View File

@ -0,0 +1,6 @@
---
commitizen:
name: cz_conventional_commits
tag_format: $version
version_provider: scm
version_scheme: semver

View File

@ -1,12 +1,12 @@
---
stages: [check-pr]
stages: [checks, release]
check-pr:
check-commitizen:
# Check the current commit message for compliance with commitizen
stage: check-pr
stage: checks
image: alpine:latest
inherit:
variables: false
variables:
GIT_STRATEGY: none
script:
- apk add --no-cache --upgrade py3-pip
- pip install -U commitizen
@ -15,3 +15,19 @@ check-pr:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
tag-to-release:
stage: release
# https://gitlab.com/gitlab-org/release-cli/-/blob/master/Dockerfile
image: registry.gitlab.com/gitlab-org/release-cli:latest
variables:
GIT_STRATEGY: none
script:
- apk add --no-cache --upgrade git py3-pip
- pip install -U commitizen
- git clone "$CI_PROJECT_URL.git"
- cd "$CI_PROJECT_NAME"
- CHANGELOG=$(cz changelog "$CI_COMMIT_TAG" --dry-run | sed /^Invalid/d)
- release-cli create --name "$CI_COMMIT_TAG" --description "$CHANGELOG" --tag-name "$CI_COMMIT_TAG"
rules:
- if: $CI_COMMIT_TAG != null

View File

@ -1,6 +1,8 @@
# Garuda Linux common settings
[![pipeline status](https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-common-settings/badges/master/pipeline.svg)](https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-common-settings/-/commits/master)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Latest Release](https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-common-settings/-/badges/release.svg)](https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-common-settings/-/releases)
## Found any issue?