L7. Package Management: GitHub Packages, Azure Artifacts & Versioning Strategies
Course outlineLesson 7 of 18
Upstream sources insulate builds from public registry outages, feed views promote packages without duplicating them, and SemVer vs CalVer is a consumer-facing decision, not just a technical one.
Package Feeds: Centralize Dependency Management
Modern software projects depend on dozens or hundreds of external packages (libraries, frameworks, tools). Where do these packages live, and how do you keep your builds reliable when public registries might be unavailable? Azure Artifacts is a fully managed package feed service that hosts NuGet, npm, Maven, Python, and universal packages in one place. GitHub Packages hosts container images via GitHub Container Registry (GHCR) and language packages. Some registries inherit repository permissions, while registries such as GHCR support granular package permissions.
Azure Artifacts upstream sources can save packages from supported registries into a feed. GitHub Packages is a package host; do not assume it provides the same upstream caching feature.
Upstream Sources: Caching and Resilience
An upstream source in Azure Artifacts is a virtual link to a public package registry (npm, NuGet, Maven, Python registry). When your pipeline requests a package that is not yet in your feed, Azure Artifacts saves it into the feed if the requesting identity has Feed and Upstream Reader (Collaborator) permissions or higher.
The benefit is twofold: first, subsequent builds can resolve that saved version from the feed, not the public registry. Second, if the public registry has an outage, builds can still resolve the package because it is cached locally. This is resilience without a secondary registry or manual mirroring.
Feed Views: Quality Gates Without Duplication
Azure Artifacts feed views let you promote a package through quality gates without duplicating it. A single package binary can be exposed differently depending on its promotion state:
- @Local: Packages published directly to your feed and packages saved from upstream sources
- @Prerelease: Packages that have passed initial testing but are not yet released
- @Release: Packages cleared for production consumption
Publish to the base feed, then promote a validated version to @Prerelease or @Release. Promotion adds a version to a view; it does not move or republish it. Views are not automatic test gates, and promoted packages cannot be demoted. Consumers using the Release view see only production-ready packages, while your CI pipeline can consume the Prerelease view to test pre-release builds.
Semantic Versioning vs Calendar Versioning
A crucial exam concept: choosing a versioning scheme is not purely technical, it is a business and consumer-facing decision. Semantic Versioning (SemVer) uses MAJOR.MINOR.PATCH (e.g., 2.0.1). A MAJOR version bump signals a breaking change. If a library is on v2.1.3 and releases v3.0.0, consumers immediately understand that upgrading requires testing for compatibility breaks. SemVer is the right choice for shared libraries and frameworks where external consumers must reason about breaking changes. Calendar Versioning (CalVer) uses dates or release cadence (e.g., 2026.07.1 for July 2026, release 1). CalVer suits products where release timing matters more than API compatibility signaling. A SaaS application released weekly, an internal tool, or a product where all users upgrade in lockstep can use CalVer.
Build Numbers Are Not Package Versions
A critical distinction: a pipeline's own build number (Azure Pipelines' BuildId, GitHub Actions run number) is separate from the semantic version assigned to a package that pipeline produces.
A build can carry its own number for traceability, and the package derived from it carries a different, intentional semantic version. Conflating the two is a common design mistake that breaks consumers' ability to reason about compatibility.
| Aspect | SemVer | CalVer |
|---|---|---|
| Use Case | Shared libraries, frameworks | Products, release timing matters |
| Consumer Signal | Compatibility impact | Release timing |
| Example | 2.1.0 (breaking change if MAJOR bumps) | 2026.07.1 (released July 2026) |
References
- AZ-400 study guide
- Upstream sources
- Feed views
- Promote packages
- GitHub Packages permissions
- Semantic Versioning
Continue Learning
- ✓Azure Artifacts upstream sources proxy and cache packages from public registries, so builds do not depend directly on public registry availability and can still resolve packages during an outage if the required versions have already been saved
- ✓Feed views (like @Local, @Prerelease, @Release in Azure Artifacts) let a package be promoted through quality gates without duplicating it, by changing which view exposes it
- ✓GitHub Packages supports repository-scoped or granular package permissions depending on the registry
- ✓Semantic Versioning (SemVer) signals compatibility through MAJOR.MINOR.PATCH, making it the right choice when consumers need to reason about breaking changes; CalVer signals release timing instead and suits products where release cadence matters more
- ✓A pipeline's own build/run number is a separate concept from the semantic version assigned to a package that pipeline produces; conflating the two is a common design mistake
1. A company's build pipeline depends on public npm packages, but a public registry outage recently broke every build company-wide for hours. What Azure Artifacts feature directly addresses this risk?
2. A team wants consumers of its Release view to see only validated package versions, without publishing a second copy of the package. What Azure Artifacts feature supports this?
3. A software library used by many external consumers needs its version number to clearly signal whether an update contains breaking changes. Which versioning scheme is designed for this?