This repository follows the same release process as the other ServiceComposer repository: ServiceComposer.AspNetCore.
Versions are calculated by MinVer from git tags. Nothing else sets a version number.
masteris where development happens, and it always builds the next major that hasn't been branched yet. ItsMinVerMinimumMajorMinor, insrc/ServiceComposer.AspNetCore.Testing/ServiceComposer.AspNetCore.Testing.csproj, is set to that major, so untagged builds are versionedN.0.0-alpha.0.<height>.release-X.Ybranches stabilize and patch anX.Yrelease. Betas, release candidates, the final release, and patch releases are all tagged on the release branch, never onmaster.
To see which release branches exist, and what each branch builds:
git branch -r --list 'origin/release-*'
dotnet build src/ServiceComposer.AspNetCore.Testing/ServiceComposer.AspNetCore.Testing.csproj -t:MinVer -getProperty:MinVerVersionVersions released before this process was adopted were tagged on master and may have no release branch. To patch one, create release-X.Y from its X.Y.0 tag.
-
Every change goes to
masterfirst, through a pull request. -
If a change also has to ship in a release that's being prepared, cherry-pick it onto a branch created from
release-X.Yand open a pull request againstrelease-X.Y:git switch -c backport-<topic>-to-X.Y origin/release-X.Y git cherry-pick -x <commit>...
-xrecords the original commit in the message. Include any earlier commits the change depends on. -
Don't backport:
- Dependabot dependency updates, unless the release needs them: release branches keep their own dependency set.
- Workflows that only run from the default branch, such as the project board one.
Anything merged to master after a release branch is created is not in that release unless it's backported.
To start stabilizing major X (for example, the first X.0.0-beta.1):
- On
master,MinVerMinimumMajorMinorshould already beX.0. - Create
release-X.0frommasterand push it. - Open a pull request on
masterthat setsMinVerMinimumMajorMinortoX+1, somastermoves on to the next major. - Tag the first pre-release on
release-X.0, as described below.
Don't change MinVerMinimumMajorMinor on master to get a release out of it: releases come from the release branch.
To start a new minor of a major that's already branched, create release-X.Y from the previous minor's release branch and push it. Then backport what it should ship, as described above.
-
Make sure everything that should ship is merged into
release-X.Y, including backports, and that its CI build is green. A new vulnerability advisory can break a build that used to pass, so if the branch has been quiet, run CI again first:gh workflow run ci.yml --ref release-X.Y
-
A stable release must not depend on a pre-release, and NuGet warns about it when packing (NU5104). If needed, raise the lower bound of the version range to the stable version first.
-
Tag the release branch and push the tag:
git switch release-X.Y git pull git tag X.Y.Z # or X.Y.Z-beta.N, X.Y.Z-rc.N git push origin X.Y.ZTags have no
vprefix: the CI workflow only runs on tags matching[0-9]+.[0-9]+.[0-9]+and[0-9]+.[0-9]+.[0-9]+-*. -
The tag build runs the tests and publishes the packages:
- pre-release tags (
X.Y.Z-*) go to the Feedz.io pre-releases feed - stable tags (
X.Y.Z) go to NuGet.org
- pre-release tags (
-
Create the GitHub release from the tag, with notes generated since the previous release:
gh release create X.Y.Z --verify-tag --generate-notes --notes-start-tag <previous-tag>
Add
--prereleasefor pre-release tags, and--latest=falsewhen releasing an older major. Call out breaking changes, such as a new minimum .NET version, at the top of the notes.
ServiceComposer.AspNetCore and ServiceComposer.AspNetCore.Testing are released independently, in any order, and their version numbers aren't aligned. Neither package depends on the other. The tests in ServiceComposer.AspNetCore use this package from NuGet.org, and Renovate only proposes patch updates for it there, so that reference has to be updated manually to pick up a new minor or major.