Member-only story

GitLab CI/CD versioning with tag

Pietro Colombo
Dev Genius
Published in
3 min readAug 21, 2024
Photo by Wolfgang Weiser on Unsplash

This guide uses GitLab’s CI/CD and commitizen to manage version progress and update the CHANGELOG.md file.

The idea is that when we do a commit on the main, or do a merge on the main, the pipeline will do the version advance and commit the tag, CHANGELOG.md and version files.

First, a token must be created at the project or group level that will be used by the pipeline to commit.

Image by author

If the main is protected you have to give the role of Mantainer.

As a second step is to configure the variables that will be used by the pipeline in CI/CD.

Settings -> CI/CD -> Variables

The important thing is that the name you gave the token is the same as the username.
Below are pictures of the settings:

Image by author
Image by author

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Responses (2)

What are your thoughts?

For GitHub actions:
https://pietrocolombo.medium.com/github-actions-versioning-with-tag-217cb51256f1

The important thing is that the name you gave the token is the same as the username.

That’s a neat tip! It really helps to keep things organized and clear.