Release Flow
Release Flow
Section titled “Release Flow”This repository uses the shared Purview.Build pipeline for
the full PR/release cycle, and plain dotnet/just commands for focused local work.
Versioning
Section titled “Versioning”package.jsonis the single source of truth for the version. Theversionfield is read by the SDK’s Version Detection logic and applied toVersionandPackageVersionfor every build and pack.- Current package version: read from
package.json(just current_version).
Local workflow
Section titled “Local workflow”dotnet tool restore # install local tools (csharpier, etc.)just build # dotnet build src/BuildSdk.slnx --configuration Debugjust test # dotnet test with a TUnit tree-node filterjust lint-check # csharpier checkjust lint-fix # csharpier format .just pack # dotnet pack to ./artifactsjust pipeline-pr # restore, build, lint, tests, pack, package validationjust pipeline-local-release # restore, build, lint, tests, pack, local NuGet publishPipeline workflows
Section titled “Pipeline workflows”| Recipe | Purpose |
|---|---|
just pipeline-pr |
PR pipeline — restore, build, lint, tests, pack, package validation. |
just pipeline-build |
Build pipeline — restore, build, lint, pack, package validation (no tests). |
just pipeline-tests |
Tests pipeline — restore, build, lint, tests (no pack). |
just pipeline-release |
Release pipeline — restore, build, lint, tests, pack, publish to NuGet, GitHub release. |
just pipeline-local-release |
Release pipeline with a local NuGet publish (--Release:Mode=LocalNuGet). |
The pipeline configuration lives in purview-build.json:
{ "Build": { "Solution": "src/BuildSdk.slnx", "TestRoot": "src/tests", "TestPatterns": "*Tests.csproj", "TestFilter": "/*/*/*/*[Category=Unit]/" }, "PackValidation": { "RequireSymbolPackage": false }, "Release": { "Mode": "None" }}CI workflows
Section titled “CI workflows”- PRs —
.github/workflows/pr.ymlruns the PR pipeline on pull requests. - Releases —
.github/workflows/release.ymltriggers on pushes tomainand runs the sharedpurview-release.ymlworkflow withrelease-mode: NuGet, which builds, packs, validates, and publishes the package to NuGet. continuousIntegrationBuildis detected automatically fromCI,GITHUB_ACTIONS, orTF_BUILDenvironment variables for deterministic SourceLink output.
Testing
Section titled “Testing”- Tests use Microsoft.Testing.Platform (
global.jsonsets"runner": "Microsoft.Testing.Platform") and TUnit conventions. - CI runs the full suite on
ubuntu-latest, so all tests and features must work identically on Windows, Linux, and macOS — never hardcode platform-specific paths in tests or fixtures. - The integration harness (
ProjectHarness) creates throwaway projects underPath.GetTempPath(); seesrc/tests/BuildSdk.IntegrationTests/Harness/ProjectHarness.cs. - Linux agent-pack integration tests can be run locally via
just test-linux(Docker-based).