ci: 👷 initialize cz and add bump tag pipeline with cz
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
RaviAnand Mohabir 2024-06-23 17:01:32 +02:00
parent e901168e7f
commit 45a7f6beed
2 changed files with 32 additions and 4 deletions

View File

@ -1,9 +1,26 @@
kind: pipeline
type: docker
name: publish Docker image
name: tag, create release and publish Docker image
steps:
- name: publish
- name: bump tag
image: python:3.12
commands:
- git config --global user.email "drone@dikurium.ch"
- git config --global user.name "Drone"
- git config --global url."https://$GIT_USERNAME:$GIT_TOKEN@gitea.dikurium.ch/".insteadOf "https://gitea.dikurium.ch/"
- git config --global --add --bool push.autoSetupRemote true
- git fetch --tags
- pip install -U Commitizen
- cz bump
- git push --follow-tags
- cz changelog $(cz version -p) > CZ_CURRENT_CHANGELOG.md
environment:
GIT_USERNAME:
from_secret: git_username
GIT_PASSWORD:
from_secret: git_password
- name: publish Docker image
image: plugins/docker
settings:
repo: gitea.dikurium.ch/InnoPeak/drone-gitea-release
@ -15,5 +32,7 @@ steps:
from_secret: docker_password
trigger:
branch: [main]
event: [push]
branch:
- main
event:
- push

9
cz.yaml Normal file
View File

@ -0,0 +1,9 @@
---
commitizen:
bump_message: "chore: bump $current_version \u2192 $new_version [CI SKIP]"
major_version_zero: true
name: cz_conventional_commits
tag_format: $version
update_changelog_on_bump: true
version: 0.0.1
version_scheme: semver