Skip to content

Publishing Packages

Morgan Touverey Quilling edited this page Jul 13, 2024 · 2 revisions

We will keep the npm and NuGet packages versions in sync, even if one of those projects had no changes.
This will be easier for API consumers to ensure they have properly synchronized SDKs.

We will also use strict semantic versioning.

The first time, ensure you are logged in to npm with npm login and NuGet (download) with nuget setApiKey YOUR_API_KEY.

  1. Commit all previous changes separately.
  2. Update NetDevKit/NetDevKit.csproj#Version and JSDevKit/package.json#version with the new version number.
  3. If there is a breaking change, update NetDevKit/NetDevKit.csproj#AssemblyName (ex. UrbanDevKitV1 to UrbanDevKitV2) so mods can load different versions of the SDK.
  4. Update CHANGELOG.md with the new version and describe additions and changes.
  5. Build the projects.
    The JavaScript SDK is always built in production mode. Run bun run build.
    For .NET, ensure you switch to Release mode. Hit Build in your favorite IDE.
  6. Launch the game and ensure the test mods are working as expected.
  7. Commit the changes: chore(release): publish version x.x.x
  8. Run bun release to publish the new version to npm and NuGet (@todo).
  9. Tag the commit with the new version number.
  10. Push the commit and the tag to the repository.
  11. Create a GitHub release from the tag, and copy the changelog entry in the description.

The process is a bit manual for now, but at least it gives us control, and does not necessitate a thousand deps and config files (I tried).
Contributions to automate this in a reasonably simple way are welcome!

Features & Helpers

.NET-only Features

  • Shared State Share state between assemblies without linking
  • Coroutine Runner Helper to start coroutines from anywhere or wrap them into Tasks.

UI-only Features

.NET+UI Features

Contributing

Clone this wiki locally