Squad.SDK.NET follows Semantic Versioning 2.0 with a branch model aligned to upstream:
dev -> preview -> main
The canonical SDK version lives in src/Squad.SDK.NET/Squad.SDK.NET.csproj:
<Version>0.1.0</Version>For example, if the current version is 0.1.0, that value is read by the release automation.
Release automation reads the effective version from MSBuild, not from a manually pushed tag.
| Branch | Role | Version state |
|---|---|---|
dev |
Integration branch for feature work | Holds the current stable SDK version plus pending .changeset entries |
preview |
Release-candidate branch | Holds the next stable release version with changesets already applied |
main |
Released branch | Matches the promoted preview candidate and triggers the stable release |
Release-worthy SDK changes are tracked in .changeset/*.md files on dev.
Example:
---
"Squad.SDK.NET": minor
---
Add preview validation for release candidates.Supported bump types:
| Type | Meaning |
|---|---|
patch |
Backwards-compatible fixes |
minor |
Backwards-compatible features |
major |
Breaking public API changes |
For this repo's single-package .NET layout, changesets are applied during dev -> preview promotion:
- The highest pending bump is selected (
major > minor > patch) <Version>in the SDK csproj is bumpedCHANGELOG.mdgets a new release entry- Applied changeset files are removed from the promoted branch
- PRs target
dev - Releaseable SDK changes must include a
.changesetentry - CI validates the SDK and the pending changeset set
Run .github/workflows/promote.yml with the dev-to-preview stage. The workflow:
- Merges
devintopreview - Applies pending changesets to the SDK version + changelog
- Pushes the release candidate to
preview
Pushing to preview triggers .github/workflows/preview.yml, which:
- Verifies the preview version is a stable SemVer (
MAJOR.MINOR.PATCH) - Verifies the changelog contains that version
- Ensures no pending changesets remain
- Builds, tests, and packs the SDK
Run .github/workflows/promote.yml with the preview-to-main stage. The workflow:
- Verifies
previewis release-ready - Merges
previewintomain - Syncs the release commit back into
dev
Pushing to main triggers .github/workflows/release.yml, which:
- Reads the version from MSBuild
- Verifies the changelog contains that version
- Ensures there are no pending changesets
- Skips cleanly if
v<Version>already exists - Builds, tests, and packs the SDK
- Tags the commit as
v<Version> - Creates the GitHub Release
- Publishes to NuGet.org when
NUGET_PUBLISH_ENABLED == 'true'
NuGet publishing uses a GitHub Environment named release. To configure:
- Go to Settings → Environments → New environment
- Name it
release - (Optional) Add required reviewers for manual approval
- (Optional) Restrict to the
mainbranch under Deployment branches - Add the
NUGET_API_KEYsecret
While the version is 0.x.y, minor version bumps may include breaking changes. The public API is not yet stable. After 1.0.0, breaking changes will only occur in major versions.