drone-gitea-release/.drone.yml
RaviAnand Mohabir c7a9f0573f
Some checks failed
continuous-integration/drone/push Build is failing
ci: 👷 enable annotated tag to allow git push --follow-tags to work
2024-06-25 14:26:09 +02:00

50 lines
1.4 KiB
YAML

kind: pipeline
type: kubernetes
name: tag, create release and publish Docker image
steps:
- 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_PASSWORD@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 --annotated-tag --yes
- 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:
registry: gitea.dikurium.ch
repo: gitea.dikurium.ch/innopeak/drone-gitea-release
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password
- image: gitea.dikurium.ch/innopeak/drone-gitea-release
name: create release
settings:
gitea_password:
from_secret: git_password
gitea_url: gitea.dikurium.ch
gitea_username:
from_secret: git_username
notes_file: CZ_CURRENT_CHANGELOG.md
owner: innopeak
repo: drone-gitea-release
trigger:
branch:
- main
event:
- push