A .NET CLI tool (with interactive support) to manage versioning and changelogs with a focus on multi-package repositories.
Key features include:
- Generates
CHANGELOG.mdin unified form - Calculates new version of module based on:
- changes in current module
- changes in all dependent modules
- Publishes packages into NuGet artifactory
This .NET implementation is port from original npm implementation @changesets/cli
(GitHub repository).
Usage:
changeset [OPTIONS] [COMMAND]
Options:
-h, --helpPrints help information-v, --versionPrints version information
Commands:
initSets up the .changeset folder and generates a default config file. You should run this command once when you are setting up changesetsaddUsed by contributors to add information about their changes by creating changeset filesversionTakes existing changeset files and updates versions and dependencies of packages, as well as writing changelogspublishThis publishes changes to specified nuget repositorystatusProvides information about the changesets that currently exist. If there are no changesets present, it exits with an error status code
net-changesets can be used together with the original changesets GitHub action. The action supports custom commands for the versioning and publishing steps, so a net-changesets tool can be used instead of the default JavaScript-based changesets CLI tool.
After each merge to the main branch, the action creates a release PR. During that step, changeset version converts changeset files into changelog entries and bumps C# project versions. When the release PR is merged, changeset publish builds and publishes NuGet packages to the configured nuget source.
Minimal action configuration:
- name: Create release pull request or publish packages
uses: changesets/action@v1
with:
version: changeset version
publish: changeset publishJust a note: we don't need to override changesets status, because both the .NET and Node.js implementations use the same behavior for this command.
Important workflow details:
- Checkout should use
fetch-depth: 2, becausechangeset publishcompares the last two commits to find changed packages. - If the workflow runs
changeset status, usecontinue-on-error: truewhen an empty changeset state should not fail the job. - The publish target is controlled by the net-changesets configuration and NuGet configuration. The demo publishes to a local folder package source configured in .changeset/config.json and nuget.config.
For a complete working example, see the net-changesets demo repository, especially the configured release workflow. The workflow wires the changesets action to net-changesets through its custom command inputs, as shown around line 44. It also shows the required checkout depth at line 16 and a non-failing status check at line 48. An example generated release PR is available at magiino/Marekth.NetChangesets.Demo#7, and the repository commit history shows the release flow in detail.
You can fork the demo repository and try the workflow yourself !!! :)
The changesets action can also customize the release PR title, description, commit message, and other behavior. See the action inputs documentation for the full list of supported options.
You can find the Roadmap here.
You can find the Contribution Guidelines here.
Install tool by running dotnet tool install:
dotnet tool install solarwinds.changesets --globalUpdate tool by running dotnet tool update:
dotnet tool update solarwinds.changesets --globalUninstall tool by running dotnet tool uninstall:
dotnet tool uninstall solarwinds.changesets --global