# AZ-401: Release Identity with Tags SemVer CalVer and Artifacts

Connect a declared SemVer or CalVer version to a verified source tag and an exact build output, with a worked identity mapping and clear signing, compatibility and retention limits.

Author: LearningPathX Editorial Team
Content version: 1.0
Published: 2026-12-04T02:21:58.664656+00:00
HTML: https://learningpathx.com/guide/AZ-401/az-401-release-identity-with-tags-semver-calver-and-artifacts.html

## AZ-401: Release Identity with Tags SemVer CalVer and Artifacts

Connect a release through an explicit chain: a declared version names the intended product change, a source tag identifies its selected revision, and a complete build/output coordinate selects the bytes that were validated. Verify each connection independently. Neither a three-part version nor a date proves compatibility; neither a Git tag nor a successful build proves that a particular downloaded file is the approved output.

Choose Semantic Versioning (SemVer) when a declared public application programming interface (API) provides the compatibility contract. Choose Calendar Versioning (CalVer) when a documented release-calendar scheme better communicates the project's versions, and declare compatibility separately. In either case, keep the source revision, build execution and output identity in the release record. The worked example below creates a local source tag and records a concrete mapping to an existing build artifact; it makes no registry-publication or cloud-execution claim.

## Separate version meaning from release evidence

A useful release identity answers several different questions. One label should not silently answer all of them.

| Identity element | Question it answers | Evidence to preserve |
| --- | --- | --- |
| Product or package version | Which declared version is this? | Scheme, package identity and actual version metadata |
| Source tag and full commit | Which source was selected? | Tag name, tag kind and the explicitly selected full commit identifier |
| Pipeline execution | Which build produced the candidate? | Platform, organization/project, pipeline and exact run identifier |
| Output coordinate | Which file or package did that run produce? | Artifact name, file path or package coordinate, and exact version |
| Output digest | Are these the same bytes that were approved? | Recorded cryptographic digest and repeat comparison |

This is a recommended evidence model, not a built-in schema shared by Git, Azure Pipelines and GitHub Packages. A trustworthy record connects actual observations from those systems. Adding a field without checking its value only creates another assertion.

## Declare SemVer or CalVer before assigning the number

SemVer 2.0.0 requires a declared public API. For stable versions, incompatible API changes require a major increment, backward-compatible functionality a minor increment, and backward-compatible fixes a patch increment. Major zero indicates initial development. Prerelease labels have lower precedence than the associated normal release; build metadata does not affect precedence. Released package contents must not be changed under the same version.

For example, recommending `2.4.0` after `2.3.1` is justified only if the declared compatibility rules support that change. A filename containing `2.4.0` cannot establish that the package implements those rules. Keep the compatibility review and tests with the release decision.

CalVer allows project-specific calendar schemes rather than one universal format. Declare the date components, padding and any additional sequence or modifier. An illustrative project might choose a full-year/month form with a documented within-month sequence. It must also explain what consumers can assume about breaking changes. A newer calendar label communicates ordering within that scheme, not automatic backward compatibility or a guaranteed support lifetime.

Avoid silently mixing schemes between components. If a product has a calendar release label but a dependency uses SemVer, preserve both fields and describe their relationship. Do not reinterpret the dependency's major number as a year or derive compatibility from the product's date.

## Understand what the source tag establishes

A lightweight tag directly names an object. An annotated tag has a tag object containing tagger details, date and message, with an optional signature. Annotation alone is not signature verification. Git exposes explicit signing options and a separate verification operation.

The tag reference must also remain trustworthy: Git can replace an existing name when forced. As a release-control recommendation, reject an already-used release name and investigate a mismatch rather than moving it to make the mapping appear consistent. Tag identity, author trust, compatibility and output integrity remain separate checks.

## Implement one tag-to-output mapping

This is a bounded, illustrative exercise for an authorized nonproduction repository. It assumes an existing working build pipeline, a known package format and a real downloadable output. It does not create a pipeline, publish a package, push a tag or deploy software. No example command was executed for this article.

### Prepare the inputs and select the revision

For the example, declare the package version as `2.4.0` and the source tag as `v2.4.0`. The `v` prefix is a tag-naming convention; it is not part of the SemVer package value. First use the project's existing package tooling to set and review the actual package version, then select the resulting committed source revision. Do not tag an earlier commit and later edit its package metadata while claiming the original identity still describes the new output.

Use these input variables in a Bash session. Populate every observed value from the actual approved repository/build and inspect it before proceeding. Values must be single-line text. A release record should contain identifiers and digests, never credentials.

| Input variable | Required value |
| --- | --- |
| `release_commit` | Approved full commit identifier already present in this local repository |
| `package_identity` | Actual package name or coordinate for the chosen format |
| `pipeline_run` | Complete organization/project/pipeline/run coordinate of the selected execution |
| `artifact_name` | Actual artifact name within that run |
| `artifact_file` | Exact file path within that artifact |
| `artifact_sha256` | SHA-256 digest measured from that exact output file using approved local tooling |

For the digest, choose the packaged file itself, not a changing download wrapper or a directory listing. Record the algorithm and the byte object being measured. A digest is useful only when its reference value was captured from the intended candidate and kept with trusted approval evidence.

### Create and check the local annotated tag

Check the installed Git version against the current manual. In the intended repository, use the explicitly supplied commit rather than relying on the current checkout:

```bash
release_version='2.4.0'
release_tag='v2.4.0'
: "${release_commit:?Set the approved full source commit first}"
git tag -a "$release_tag" -m "Release $release_version" "$release_commit"
git tag --list --points-at "$release_commit" "$release_tag"
```

Require successful creation and the exact tag name in the filtered listing. Stop on any command failure or missing result; creation refuses an existing name without force. These commands operate locally. They do not prove that a remote consumer sees the tag.

If the release requires a signed tag, select a supported signing backend and authorized key before creation and use the appropriate signing option. For a signed tag, `git tag -v` verifies its signature; require the expected trusted signer and investigate failures. That operation does not turn the unsigned annotated example into a signed tag, nor does a valid signature prove the build output matches.

### Save the declared mapping to the actual build artifact

Select a real run whose observed source revision equals `release_commit`. Check its build and validation results, actual package metadata and published artifact list. If that evidence is unavailable, stop before accepting the mapping. Do not substitute the current branch tip or the most recent successful run.

The following creates a project-defined text record in a new, empty exercise directory. Populate the six observed inputs above first, and confirm that `release-identity.txt` does not already exist; preserve an existing record instead of overwriting it.

```bash
: "${package_identity:?Set the actual package identity}"
: "${pipeline_run:?Set the exact pipeline run coordinate}"
: "${artifact_name:?Set the actual artifact name}"
: "${artifact_file:?Set the exact output path}"
: "${artifact_sha256:?Set the measured output digest}"
printf 'release_version=%s
source_tag=%s
source_commit=%s
package_identity=%s
package_version=%s
pipeline_run=%s
artifact_name=%s
artifact_file=%s
artifact_sha256=%s
' \
  "$release_version" "$release_tag" "$release_commit" \
  "$package_identity" "$release_version" "$pipeline_run" \
  "$artifact_name" "$artifact_file" "$artifact_sha256" > release-identity.txt
```

This record implements the declared mapping: one release/package version, one source selection and one output from one execution. Check that the actual package metadata says `2.4.0`; writing that value into the record cannot change the package. Keep the record outside the commit it identifies, avoiding a claim that a commit contains its own final identifier. Store it with the build/approval evidence through the team's established process.

Azure Pipelines treats a run as one execution and artifacts as published files or packages. Those run artifacts are distinct from Azure Artifacts package feeds. GitHub Packages, in turn, uses format-specific registries and native package clients, with registry-dependent permissions and authentication. This example selects a build output; it does not pretend the text record publishes a GitHub package or establishes universal registry immutability.

### Verify the selected release, including the bytes

Use an independent read of the record and the selected build to complete this acceptance check:

1. Confirm the tag still selects the recorded full commit and that the run used that same source revision. A branch name alone is insufficient.
2. Inspect the package's actual identity and embedded version. Confirm they match the record rather than trusting the artifact's filename.
3. Retrieve the exact artifact/file from the recorded run, recompute its SHA-256 digest and compare it with the recorded digest. A matching filename is not a byte comparison.
4. Inspect the run's real validation results and the evidence required by the release owner. A matching digest proves equality with the referenced bytes, not correctness, compatibility or provenance by itself.
5. Preserve the output and its trusted record under controls appropriate to the selected storage system. Verify that later consumers select this approved output rather than rebuilding from the tag and assuming identical bytes.

A rebuild may use changed dependencies or tools even when source is unchanged. As an engineering recommendation, assign a new build/output identity to a distinct candidate and validate it separately. Do not reuse the approved record for different bytes. Conversely, rerunning a download comparison verifies the selected artifact's current bytes; it does not reproduce the build environment.

## Keep immutability and availability as explicit conditions

An identity record detects mismatches only if its own reference values and approval history are protected. Define who can replace a tag, alter the record, change a stored output or approve a replacement. A digest detects a change against a trustworthy baseline; it does not prevent modification or deletion. Avoid claiming immutability from a version label or from generic package hosting alone.

Azure Pipelines run retention can remove logs, run metadata and pipeline/build artifacts. Package retention is a separate concern: run retention does not govern all package types. Retain the evidence needed for this mapping through the appropriate owners and controls; detailed retention configuration belongs to Retention for Pipeline Outputs and Release Dependencies.

For an exercise, let the owner decide whether the local tag and record should be retained. Remove only clearly owned disposable exercise material after its evidence is no longer required. Do not delete a shared release tag, a pipeline run or a package as casual cleanup.

## Diagnose a broken identity chain

| Observation | Interpretation and next action |
| --- | --- |
| Tag selection differs from the run's source revision | Stop acceptance and determine which selection was approved; do not move the tag to hide the discrepancy. |
| Package metadata disagrees with the declared version | Correct the source/build version process and produce a new reviewed candidate. Renaming the archive is insufficient. |
| Same output coordinate yields a different digest | Preserve both observations and investigate the storage/download/selection path. Do not refresh the reference digest merely to obtain a match. |
| Record exists but the output has expired | Identity evidence remains incomplete for consumption or recovery; resolve availability through the storage owner. |
| Signature verifies but bytes or compatibility checks fail | Signature, output selection and behavior are separate acceptance conditions. Investigate the failed condition. |

A useful release handoff lets another operator start with the version and reach the same source, run and bytes without guessing. That is the practical outcome of release identity; the naming scheme is only one part of the chain.

## Authoritative Sources

* [Semantic Versioning 2.0.0](https://semver.org/) — Declared public API, version precedence and released-content rules.
* [Calendar Versioning](https://calver.org/) — Project-specific calendar scheme terminology.
* [Git tag manual](https://git-scm.com/docs/git-tag) — Tag kinds, explicit target, creation, filtering, signing and verification.
* [Key Azure Pipelines concepts](https://learn.microsoft.com/en-us/azure/devops/pipelines/get-started/key-pipelines-concepts?view=azure-devops) — Run and artifact identity distinctions.
* [Introduction to GitHub Packages](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages) — Registry formats, package clients and access conditions.
* [Azure Pipelines retention policies](https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops) — Run-related deletion and separate package lifetime.

## Related Reading

* Prerequisite: [AZ-401: Branch Strategies and Git Worktree Boundaries](https://learningpathx.com/guide/az-401/az-401-branch-strategies-and-git-worktree-boundaries.html)
* Related: [AZ-401: Package Feeds Views and Upstream Dependency Sources](https://learningpathx.com/guide/az-401/az-401-package-feeds-views-and-upstream-dependency-sources.html)
* Related: [AZ-401: Retention for Pipeline Outputs and Release Dependencies](https://learningpathx.com/guide/az-401/az-401-retention-for-pipeline-outputs-and-release-dependencies.html)
