Skip to content

Publish NuGet packages with trusted publishing - #6

Merged
thebuilder merged 2 commits into
mainfrom
feat/nuget-trusted-publishing
Jul 18, 2026
Merged

Publish NuGet packages with trusted publishing#6
thebuilder merged 2 commits into
mainfrom
feat/nuget-trusted-publishing

Conversation

@thebuilder

Copy link
Copy Markdown
Owner

Summary

  • add a GitHub Actions workflow that builds, tests, packs, and publishes TheBuilder.WebAnalytics with NuGet trusted publishing
  • derive production package versions from published GitHub Release tags and support manual prerelease validation through int.nugettest.org
  • document the maintainer release process under docs/releasing.md
  • update NuGet and Umbraco Marketplace metadata for the renamed thebuilder/web-analytics repository
  • replace the package icon with the correctly sized 128 x 128 asset
  • remove accidentally committed pre-rename runtime and generated artifacts and ignore Umbraco data/log directories consistently

Why

The package needs a repeatable release process without a long-lived NuGet API key. GitHub OIDC trusted publishing provides short-lived credentials, while tag-derived versions keep the GitHub Release and NuGet package version as one source of truth.

The branch initially picked up stale files under the former Umbraco.VercelAnalytics paths. Those generated schemas, TEMP indexes, logs, and compiled backoffice assets were removed so the PR contains only the intended release setup.

Impact

A maintainer can manually publish a unique prerelease version to NuGet's integration gallery for validation. Publishing a GitHub Release with a SemVer tag such as v0.2.0 then publishes package version 0.2.0 to nuget.org after the configured GitHub environment protection.

The trusted-publishing policies and NUGET_USER environment secrets still need to be configured in the two NuGet galleries and GitHub environments before the first publish.

Verification

  • client production build
  • .NET test suite: 118 passed
  • real dotnet pack with version 0.2.0-preview.1
  • inspected generated .nuspec, package icon, README, assembly, and static web assets
  • validated workflow YAML and Umbraco Marketplace JSON
  • verified integration-gallery V3 endpoint
  • final branch diff check: 7 files, 189 additions, 8 deletions

@thebuilder
thebuilder marked this pull request as ready for review July 18, 2026 08:16
@thebuilder
thebuilder merged commit 846d3c1 into main Jul 18, 2026
@thebuilder
thebuilder deleted the feat/nuget-trusted-publishing branch July 18, 2026 08:17
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.

1 participant