Semantic Versioning (SemVer) is a versioning system designed to convey meaning about the underlying changes in a software release. It follows the format:
- MAJOR: Increases when there are incompatible API changes.
- MINOR: Increases when new features are added in a backward-compatible manner.
- PATCH: Increases when backward-compatible bug fixes are made.
1.0.0
: Initial release.1.1.0
: A new feature added (minor change).1.1.1
: A bug fix (patch change).2.0.0
: A breaking change (major update).
Git tags are references that point to specific commits, often used to mark release versions. They help in:
- Identifying release versions.
- Facilitating rollbacks.
- Simplifying deployment processes.
- Annotated Tags: Include metadata (e.g., author, date) and are stored as objects in Git.
- Lightweight Tags: Simpler and act as a pointer to a specific commit.
- Code reaches the
main
branch:- Trigger the release pipeline.
- Determine the next version:
- Use a tool (e.g.,
semantic-release
) or custom logic to determine whether a MAJOR, MINOR, or PATCH update is required based on commit messages or other indicators.
- Use a tool (e.g.,
- Create a Git Tag:
- Automatically generate and push the tag to the repository.