Creating a new release and deploying the package to nuget are administrative tasks and require that you have/do the following:
- Admin access to the GitHub NuGet organization
- Admin rights to the octokit.net repository
- For any PRs that should be noted in the release notes, each pull request must have a comment formatted like
release_notes: description
where description represents the details of the change.
- Create a branch named
release
. - Push the branch to GitHub and create a pull request. This will kick off the CI builds to verify the changes.
- Test!
- Generate the release notes.
Octokit.ReleaseNotes generate v0.50.0 [BASE] [HEAD]
Any PRs that should be noted in the release notes, each pull request must have a comment formatted likerelease_notes: description
where description represents the details of the change. Make sure for the commit range any changeset in a PR that should be represented has a comment on the PR prefixed withrelease_notes:
and corresponding label (details below) - When you're satisfied with this release, create a tag
git tag v#.#.#
. For example, to create a tag for 1.0.0git tag v1.0.0
- Push the tag to the server.
git push --tags
- When the tag is successfully pushed, the publish workflow will run and build and push the package to nuget
- Verify that the package has been uploaded to nuget.org
- Accept the pull request
- Create a new release using the tag you just created and pasting in the release notes you just generated
Release notes generator: this is used to pull details using the GitHub API to generate the release notes.
The generator helps in that it produces release notes that are consistently formatted based on information directly from the change scope (from the previous release to the current tip i.e. the release
branch).
The nuances are mostly around how it gets and parses release notes from the PRs found in the changeset. The following are the comment prefixes that the generator currently supports:
release_notes
- Having this in the comment with a corresponding "category" label on the PR will put the given note under the "Release Notes" section of the output in the group for the given labeladvisories
- Having this in the comment will put the given note into the "Advisories and Breaking Changes" section of the output
In addition to formatted comment parsing, the generator also looks at the following labels to generate categories with in the release notes.
category: bug
- This will add the comment in the PR prefixed withrelease_notes
into theFixes
groupcategory: docs-and-samples
- This will add the comment in the PR prefixed withrelease_notes
into theDocumentation Updates
groupcategory: feature
- This will add the comment in the PR prefixed withrelease_notes
into theFeatures/Enhancements
groupcategory: housekeeping
- This will add the comment in the PR prefixed withrelease_notes
into theHousekeeping
group
When these labels are added to a given PR the generator will produce and categorize comment in the release notes formatted like:
Comment content
- PR Id and link
via Contributor
ex. "Cleans up some mentions of master
branch in codebase - #2306 via @shiftkey"
When running the release notes generator on a mac if dotnet has not been added to the PATH or there is not alias defined in your dotfiles you'll need to execute the command as follows:
dotnet run generate [BASE] [HEAD]
(where [BASE]
is the last release label (i.e. v0.50.0) and [HEAD]
represents the release
branch tip that was generated above)
The tool looks for a environment variable named OCTOKIT_OAUTHTOKEN
. This token requires a minimal scope to execute and pull the data from the repository via API. Keep in mind that if a token is not provided then you will most likely run into rate limit errors because the requests are being made anonymously.