-
Notifications
You must be signed in to change notification settings - Fork 383
Collaborators: Creating a new NuGet release
This guide is intended for collaborators with write access, but the same steps could be followed in a pull request.
We currently have 3 nugets:
The core nuget holds all the widely used units and conversions. More specialized, engineering or scientific domain specific units may later come as additional nugets.
There is an additional WindowsRuntimeComponent target, which has a limited and slightly different public API surface in order to be compatible with WinJS and C++ UWP apps. See "Creating Windows Runtime Components in C# and Visual Basic" and #150.
Serialization using Json.NET. This is currently considered experimental and the version has suffix -alpha
to make it a nuget prerelease.
We follow semver versioning and we strive to maintain backwards compatibility. A wishlist of breaking changes is maintained in #180.
Each nuget has its own .nuspec
and can do its own versioning, but the core nugets are typically versioned together.
The master
branch is our stable branch and should be more or less release ready at any given time. Our build server will automatically attempt to publish all the nugets on every master
commit, and silently fails on versions that are already published. If any of the .nuspec
files have a different version (should be a newer version), its nuget will be published with that version.
Locally with the git command line:
- Add a single commit that updates version of
UnitsNet.nuspec
andUnitsNet.WindowsRuntimeComponent.nuspec
- Title of commit:
"UnitsNet: 3.47.0"
- Push to
origin/master
(this repo) or create pull request - Add an annotated tag
"3.47.0"
with a bullet list of changes, preferably prefixed with the GitHub issue number for the relevant issue/PR. This will show up on the Release page. - Push tag to
origin/master
(this repo)
Note: You can use Build/bump-version-minor.bat and Build/bump-version-patch.bat to automatically perform steps 1 and 2, but you need to manually edit the tag content as in step 2, either in git or at the Release page.
From the GitHub website:
- Edit the
.nuspec
files (two commits instead of one, use filename in commit title) - Create a release at the Release page, this is the annotated tag in step 4
Example commit: UnitsNet: 3.46.1
Same as for Core, except:
- Update the
UnitsNet.Serialization.Json.nuspec
file - Title of commit:
"JsonNet: 1.0.0-alpha5"
- Title of tag:
"JsonNet/1.0.0-alpha5"
- Description in annotated tag should only include changes relevant to serialization
Example commit: JsonNet: 1.0.0-alpha5