Add GitHub Packages publishing - #218
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The publish workflow’s main-branch guard and “tag already exists” check currently fail with unhelpful exit codes, making release failures harder to diagnose.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a GitVersion-based versioning policy and GitHub Actions workflows to manually publish the Cntryl.Pants and Cntryl.Pants.DependencyInjection NuGet packages to GitHub Packages from main, then tag the published commit so subsequent versions advance predictably.
Changes:
- Introduces
GitVersion.ymlto pin versioning to a1.0.xpatch stream onmain. - Adds a reusable
version.ymlworkflow that computes SemVer via GitVersion and exposes it to callers. - Adds a manual
publish.ymlworkflow that packs/pushes the two packages to GitHub Packages and tags the published commit. - Pins
AssemblyVersionto1.0.0.0viaDirectory.Build.propswhile allowing NuGet package versions to advance.
File summaries
| File | Description |
|---|---|
| GitVersion.yml | Defines GitVersion policy to produce patch-incrementing 1.0.x versions on main. |
| Directory.Build.props | Pins CLR AssemblyVersion to 1.0.0.0 across the solution. |
| .github/workflows/version.yml | Reusable workflow to compute and output GitVersion SemVer values. |
| .github/workflows/publish.yml | Manual main-only publish pipeline: restore/pack/push to GitHub Packages and tag the published commit. |
Review details
Suppressed comments (1)
.github/workflows/publish.yml:124
- If the tag already exists but points at a different commit, the current
test ... = ...will fail without explaining what happened. Emitting a structured Actions error with the expected/actual SHA makes the failure actionable.
test "$(git rev-list -n 1 "$tag")" = "$GITHUB_SHA"
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The workflows and versioning configuration are internally consistent with existing CI conventions and implement the described publish/tag behavior without introducing code/runtime changes.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Summary
Release behavior
Compatibility
Validation