Skip to content

Publish GameDevKit as one NuGet package on nuget.org #393

Description

@botoddly

Goal

Publish the toolkit to nuget.org so consuming repositories can replace source-tree ProjectReference items with one package reference:

<PackageReference Include="GameDevKit" Version="0.0.N" />

This supersedes #35. That proposal used GitHub Packages, separate packages, manually managed versions, and outdated package metadata.

Before this work starts, land the dedicated GameKit.SdlangCompilerCli cleanup. The CLI cleanup itself is outside this issue.

Naming

Rename the product and every repository-owned code identifier from GameKit to GameDevKit. This includes:

  • solution, project directories, project files, projects, and assemblies
  • namespaces, generated namespaces, type names that contain the product name, and MSBuild-facing identifiers
  • tests, tutorials, documentation, build assets, and package metadata

Do not retain GameKit.* compatibility assemblies, namespaces, aliases, or packages.

The public NuGet package ID is GameDevKit. It was available on nuget.org when this issue was written, but availability must be verified again immediately before the first publish.

Package design

Publish one coordinated package rather than one package per project. All package contents use the same version and are installed by the single GameDevKit package reference.

The package must place each kind of asset according to NuGet conventions:

  • reusable runtime assemblies under lib/net10.0
  • the dependency-injection source generator under analyzers/dotnet/cs
  • automatically imported shader integration under buildTransitive
  • the shader compiler MSBuild task and its private dependencies in a build-tool location that does not add them as application references

Preserve external NuGet dependencies as package dependencies. Tests, tutorials, and standalone executables do not belong in the package.

A consumer must not need manual MSBuild imports or separate references to internal toolkit projects. Including the package must make the source generator available automatically. Declaring @(SdlangShader) must activate shader compilation automatically, while projects without shader items must not pay build-time execution costs.

Use a dedicated packaging definition if necessary; ordinary SDK project packing currently packages only the selected project's assembly and converts its project references into dependencies on packages that do not exist.

Versioning and publication

Use a monotonically increasing 0.0.N version:

  • the first release is 0.0.1
  • each later release determines the latest published GameDevKit version and increments N
  • a successful merge to main automatically publishes one release
  • validation must finish before publication, so a failed build or package test publishes nothing
  • concurrent merges and workflow retries must not produce duplicate versions, omit a successful main revision, or create multiple releases for the same revision

Publish to nuget.org from GitHub Actions using trusted publishing/OIDC and a short-lived credential. Do not store a long-lived NuGet API key.

Package metadata and debugging

Configure shared, non-placeholder metadata:

  • MIT license
  • package README
  • experimental-project description
  • repository URL and source commit
  • deterministic build and Source Link information
  • .snupkg symbol package alongside the main .nupkg

Verification

Add an isolated package-consumer test that uses only locally produced package artifacts as its GameDevKit source. It must not have a project reference or a path back into src.

The test must verify at least:

  • restore and compile through one GameDevKit package reference
  • use of a runtime API from the package
  • execution of the dependency-injection source generator
  • shader compilation through package-imported build assets
  • absence of shader task assemblies from the consumer's runtime output

Also verify the final archive layout and generated nuspec so analyzer/build assets are present, external dependencies are correct, and placeholder metadata is absent. Run the relevant package-consumer coverage on the supported Linux and Windows CI hosts.

Acceptance criteria

  • All repository-owned GameKit identifiers are renamed to GameDevKit, with no compatibility layer.
  • dotnet pack produces GameDevKit.0.0.N.nupkg and its symbol package.
  • One package reference supplies all reusable assemblies, the DI generator, and shader build integration.
  • A clean isolated consumer restores, builds, and compiles a shader without repository project references or manual imports.
  • Build-only shader tooling is absent from the consumer runtime output.
  • Package metadata, archive layout, and dependency metadata are validated.
  • Every successfully merged PR produces the next 0.0.N release on nuget.org.
  • Publishing uses nuget.org trusted publishing and safely handles concurrent or retried workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions