Use this guide to publish a package from a generated MiniScaffold library repository.
The local Release target creates a release commit and pushes the commit and a Git tag.
The tag starts a GitHub Actions workflow that publishes the package.
--outputType library.origin for that GitHub repository.nuget.nuget environment, open Environment secrets.NUGET_TOKEN with the API key as its value.Unreleased in CHANGELOG.md.For a custom branch, use the release branch guide.
The build uses CHANGELOG.md for the package version and release notes.
The release commit body also contains the release notes.
A pull request URL in those notes lets GitHub link the release commit to that pull request.
Example entry:
- Add a feature (https://github.com/<org>/<repo>/pull/123)
Replace 0.2.0 with the new version number.
Use a version without a leading v.
On macOS or Linux, run this command from the repository root:
|
On Windows, run this command from the repository root:
|
The target moves the Unreleased notes into a version section in CHANGELOG.md.
The target creates a commit with a message such as Bump version to 0.2.0.
The target pushes the commit, creates a tag such as v0.2.0, and pushes the tag to origin.
.github/workflows/publish.yml that the tag started.Publish target succeeds.The workflow builds the package in the Release configuration.
The PublishToNuGet target uses NUGET_TOKEN to publish the package.
The Publish target also creates a GitHub release.
If the build reports that you are on the wrong branch, switch to the configured release branch.
If publication fails, check the workflow output before you run another release.
Check that the nuget environment contains NUGET_TOKEN with permission to publish the package.