Skip to content

Add GitHub Packages publishing - #218

Merged
smiggleworth merged 2 commits into
mainfrom
feat/github-packages-publish
Sep 1, 2026
Merged

Add GitHub Packages publishing#218
smiggleworth merged 2 commits into
mainfrom
feat/github-packages-publish

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Summary

  • add reusable version.yml backed by GitVersion 6 and a GitVersion.yml policy rooted at 1.0.0
  • add a manual, main-only publish.yml that packs and publishes Cntryl.Pants followed by Cntryl.Pants.DependencyInjection to GitHub Packages
  • tag the exact successfully published commit so subsequent releases advance by patch
  • explicitly hold the CLR assembly identity at 1.0.0.0 while PackageVersion advances as 1.0.x

Release behavior

  • The first publish computes 1.0.0 because there are no existing Pants packages or version tags.
  • A successful publish creates v1.0.0; the next main commit computes 1.0.1.
  • Package versions outside exact 1.0.x are rejected.
  • Duplicate pushes are skipped so a partially completed release can be retried safely.
  • No package has been published by this PR.

Compatibility

  • No public API, persisted-format, durability, recovery, or dependency changes.
  • AssemblyVersion remains 1.0.0.0 for both public assemblies.

Validation

  • actionlint .github/workflows/version.yml .github/workflows/publish.yml
  • GitVersion.Tool 6.8.2 config validation: initial main 1.0.0; commit after v1.0.0 tag 1.0.1
  • package smoke at 1.0.42: exactly two packages, matching DI-to-Core dependency version, both assemblies 1.0.0.0
  • dotnet format Pants.slnx --verify-no-changes --no-restore
  • dotnet build Pants.slnx --configuration Release --no-restore (0 warnings, 0 errors)
  • dotnet test Pants.slnx --configuration Release --no-build --filter Category!=Sqrzl (1210 passed)

@smiggleworth
smiggleworth marked this pull request as ready for review September 1, 2026 20:39
Copilot AI lite review requested due to automatic review settings September 1, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.yml to pin versioning to a 1.0.x patch stream on main.
  • Adds a reusable version.yml workflow that computes SemVer via GitVersion and exposes it to callers.
  • Adds a manual publish.yml workflow that packs/pushes the two packages to GitHub Packages and tags the published commit.
  • Pins AssemblyVersion to 1.0.0.0 via Directory.Build.props while 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.

Comment thread .github/workflows/publish.yml Outdated
@smiggleworth
smiggleworth marked this pull request as draft September 1, 2026 20:51
@smiggleworth
smiggleworth marked this pull request as ready for review September 1, 2026 20:51
@smiggleworth
smiggleworth requested a lite review from Copilot September 1, 2026 20:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@smiggleworth
smiggleworth merged commit 28585a1 into main Sep 1, 2026
5 checks passed
@smiggleworth
smiggleworth deleted the feat/github-packages-publish branch September 1, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants