Semantic Versioning and GitHub Release Checkpoints
Choose a version based on compatibility
Semantic Versioning (SemVer 2.0.0) is a naming agreement, not a Git feature. For a stable public API at 1.4.2, a compatible bug fix gives 1.4.3, a compatible new feature gives 1.5.0, and a breaking API change gives 2.0.0. Versions below 1.0.0 have different stability expectations. The v prefix is a common Git naming convention; the SemVer number itself has no v. In the independent release lab, the first commit represents a stable notes API and the second a compatible fix.
git tag -a v1.4.2 HEAD~1 -m "Stable notes API"git tag -a v1.4.3 -m "Compatible fix"git log --oneline --decorate -2The older tag identifies the first commit and the newer tag identifies the second. Git does not check API compatibility or enforce SemVer. A prerelease such as 2.0.0-rc.1 precedes 2.0.0 in SemVer ordering.
Separate a tag from a release package
Git tags identify objects; GitHub Releases are hosted records associated with tags and may include release notes and downloadable assets. A local Git tag alone does not publish software. Use the same local release lab to compare what changed, then draft notes describing the fix. Do not create a hosted release in this lab.
The patch describes the compatible change in the fictional project. A release note should explain the user-visible fix, not merely repeat a hash. The GitHub behavior is documentation-reviewed, not executed.
Verify before sharing; understand signing
Before release, run the project tests, review the target commit and confirm the tag name. A signed tag includes a cryptographic signature; verification requires a configured signing backend and an appropriate trust policy. A good signature does not establish that the software is bug-free. The following inspection works without a signing key. The signing command git tag -s and verification command git tag -v are discussed only; no key generation or signing is required in this chapter.
In the lab, status is empty and the two IDs match. Practice: propose a release name for a breaking change and write a short release note. Do not move a tag already distributed; publish a corrected version instead.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Semantic Versioning and GitHub Release Checkpoints — knowledge check
Reason about release markers, tag transfer and version naming.
A stable API at 1.4.2 receives a compatible bug fix. Which version fits SemVer?
A compatible new public API feature is added to 1.4.2. Which version fits?
A breaking change to the stable API at 1.4.2 requires what version?
What does a local Git tag create on GitHub?
What can a valid tag signature establish under an appropriate trust policy?