Skip to content
David Tchepak edited this page Nov 30, 2024 · 35 revisions

Current

Release packages

  1. Move unreleased changes in CHANGELOG to new version heading.
  2. Ensure BreakingChanges.txt up to date and move unreleased breaking changes to new version heading.
  3. Ensure Acknowledgements up to date.
  4. Make final commit for release. (need to update <Version>x.y.z</Version> inside NSubstitute.csproj)
  5. Run "Release packages" build
  6. Create GitHub release and push tag for final commit as "vx.y.z" (z changes on patches, y on new features or minor changes to behaviour, x for breaking API changes). The tag message should be "NSubstitute x.y.z".
    • Can get GitHub release to generate initial release notes, then tweak as required. See previous releases for examples.
    • Be sure to credit people who contributed to the release!
  7. Grab release from release build action and push release to nuget: dotnet nuget push "bin/release/NSubstitute/NSubstitute.x.y.z.nupkg" --source=https://www.nuget.org/api/v2/package where x.y.z - package version.
  8. Publish website (built to output dir, bin/Release/nsubstitute.github.com).

Release documentation

  1. Run "Release documentation" build
  2. Publish website (built to output dir, bin/Release/nsubstitute.github.com).

Other builds

  • Build release package for internal testing before release to nuget:
    • Run "Release packages" build and get current packages for current version from main
  • Build beta, alpha, etc. release packages:
    • Use normal release package process but with pre-release version. For example: <Version>6.0.0-beta1</Version>

Archived procedures

Prior to 6.x

Previous procedures (prior to 6.0)
  • Move unreleased changes in CHANGELOG to new version heading.
  • Ensure BreakingChanges.txt up to date and move unreleased breaking changes to new version heading.
  • Ensure Acknowledgements up to date.
  • Make final commit for release.
  • Create GitHub release and push tag for final commit as "vx.y.z" (z changes on patches, y on new features or minor changes to behaviour, x for breaking API changes). The tag message should be "NSubstitute x.y.z".
    • Can get GitHub release to generate initial release notes, then tweak as required. See previous releases for examples.
    • Be sure to credit people who contributed to the release!
  • Grab release from release build action and push release to nuget: dotnet nuget push "bin/release/NSubstitute/NSubstitute.x.y.z.nupkg" --source=https://www.nuget.org/api/v2/package where x.y.z - package version.
  • Publish website (built to output dir, bin/Release/nsubstitute.github.com).

Previous procedures (prior to 5.3)

5.2 to 3.x

  • Move unreleased changes in CHANGELOG to new version heading.
  • Ensure BreakingChanges.txt up to date and move unreleased breaking changes to new version heading.
  • Ensure Acknowledgements up to date.
  • Make final commit and tag this commit as "vx.y.z" (z changes on patches, y on new features or minor changes to behaviour, x for breaking API changes). The tag message should be "NSubstitute x.y.z".
  • Build using: CONFIGURATION=Release ./build.sh --target All from the ./build directory. This will build to output/release.
    • This is for Git bash shell on Windows; otherwise try ./build/build.bat
    • Needs Ruby and bundle install first. See Prerequisites for Ruby install info. This is just for the documentation generation. If doc generation fails it could be because gems have changed; try bundle install again.
    • Alternatively can grab the build from AppVeyor after pushing.
  • Test nuget package on a project using a local repository.
  • Push final commit and tags to main repo: git push upstream && git push upstream --tags (where upstream is main repo remote)
  • Push release to nuget: dotnet nuget push "bin/release/NSubstitute/NSubstitute.x.y.z.nupkg" --source=https://www.nuget.org/api/v2/package where x.y.z - package version.
  • Publish website (built to output dir, bin/Release/nsubstitute.github.com).
  • Announce (mailing list, twitter, and unleash carrier pigeons to spread the joyous news). Be sure to credit people who contributed to the release!
  • ...
  • Profit!

Prior to 4.1

  • Move unreleased changes in CHANGELOG to new version heading.
  • Ensure BreakingChanges.txt up to date and move unreleased breaking changes to new version heading.
  • Ensure Acknowledgements up to date.
  • Make final commit and tag this commit as "vx.y.z" (z changes on patches, y on new features or minor changes to behaviour, x for breaking API changes). The tag message should be "NSubstitute x.y.z".
  • Build using: ./build.sh All configuration=Release from the ./build directory. This will build to output/release.
    • This is for Git bash shell on Windows; otherwise try ./build/build.bat
    • Needs Ruby and bundle install first. See Prerequisites for Ruby install info. This is just for the documentation generation. If doc generation fails it could be because gems have changed; try bundle install again.
  • Test nuget package on a project using a local repository.
  • Push final commit and tags to main repo.
  • Push release to nuget: build\NuGet.exe push "bin/release/NSubstitute/NSubstitute.*.nupkg" -Source https://www.nuget.org/api/v2/package. (Make sure nuget.exe is up-to-date first! nuget update -self)
  • Publish website (built to output dir, bin/Release/nsubstitute.github.com).
  • Announce (mailing list, twitter, and unleash carrier pigeons to spread the joyous news). Be sure to credit people who contributed to the release!
  • ...
  • Profit!

Prior to 3.x

  • Move unreleased changes in CHANGELOG to new version heading.
  • Ensure BreakingChanges.txt up to date and move unreleased breaking changes to new version heading.
  • Ensure Acknowledgements up to date.
  • Make final commit and tag this commit as "vx.y.z" (z changes on patches, y on new features or minor changes to behaviour, x for breaking API changes). The tag message should be "NSubstitute x.y.z". For the rare occasions when a pre-release package is required, can use (alpha|beta|rc)x.y.z.
  • Build using: ./build.sh All mode=Release targets=ALL. This will build to output/release. (This is for Git bash shell on Windows; otherwise try build.bat)
  • Test nuget package on a project using a local repository.
  • Push final commit and tags to main repo.
  • Push release to nuget: ThirdParty\NuGet\NuGet.exe push (path to .nupkg) -Source https://www.nuget.org/api/v2/package. (Make sure nuget.exe is up-to-date first! nuget update -self)
  • Copy release ZIP from output to Source/Docs/Downloads
  • Update source/docs/index.html to point to new ZIP file to download (NSubstitute-x.x.0.0.zip)
  • Commit website changes and push to repo
  • Re-build and publish website (built to output dir).
  • Announce (mailing list, twitter, and unleash carrier pigeons to spread the joyous news). Be sure to credit people who contributed to the release!
  • ...
  • Profit!

Note: I had trouble with jekyll v0.11.2 on Windows & Ruby193 (maruku would give undefined method errors). I had to gem install jekyll --version '0.11.0', and then uninstall version 0.11.2 of jekyll using gem uninstall jekyll to get it to work. I also had to gem install liquid --version '2.2.2' and uninstall the later version of that, as per this StackOverflow answer.