This document describes the complete release process for this repository.
Releases are driven by GitHub Actions using the reusable
purview-dev/build pipelines. No release steps are
performed manually.
Feature branch
→ PR to main (pr.yml runs purview-build.yml: restore + build + lint + tests)
→ merge to main (release.yml runs purview-release.yml: build, test, pack, publish)
→ GitHub Release (NuGet package + changelog, created by the pipeline)
| Component | File | Purpose |
|---|---|---|
| PR gate | .github/workflows/pr.yml |
Runs the reusable purview-dev/build purview-build.yml pipeline (restore, build, lint, tests) and builds/tests the sample solution |
| CD pipeline | .github/workflows/release.yml |
Runs the reusable purview-dev/build purview-release.yml pipeline on push to main |
| Local pipeline | Justfile pipeline-* recipes |
Mirror the CI/CD pipelines locally via the Purview.Build tool (.tools/purview-build) |
git checkout -b feat/my-change
# ... make changes ...Run the PR gate before pushing:
just pipeline-prThis restores, builds, lints, and runs the integration tests — the same gate CI enforces.
git add .
git commit -m "feat: my change"
git push origin feat/my-change
# Open a PR to mainpr.yml must pass (build, lint, tests, plus the sample build/test job) before the PR can merge.
Merge the PR into main.
Merging to main triggers release.yml, which runs the reusable purview-release.yml pipeline:
- Restores and builds the main and sample solutions.
- Runs the integration tests.
- Packs the NuGet package (version read from
package.json). - Publishes the package and creates a GitHub Release.
- The version lives in
package.json. Current Version: 5.0.0 - It is applied to
Version/PackageVersionbyPurview.BuildSdkvia package.json version detection (UsePackageJsonVersion, defaulttrue). just versionprints the current version.- After bumping
package.json, runjust update-versionto sync the version into docs/samples.
The TSG diagnostics are tracked in src/src/SourceGenerator/AnalyzerReleases.Shipped.md and
src/src/SourceGenerator/AnalyzerReleases.Unshipped.md. The files are wired up as AdditionalFiles,
so the Roslyn release-tracking analyzers validate them on every build (EnforceExtendedAnalyzerRules
is enabled by Purview.BuildSdk).
- Add new rules to
AnalyzerReleases.Unshipped.md. - At release time, create a new
## Release <version>section inAnalyzerReleases.Shipped.md, move the unshipped entries into it, and leave the unshipped file empty. - Keep the rule ID, category, and severity in sync with the
DiagnosticDescriptors insrc/src/SourceGenerator/Helpers/DiagnosticLibrary.*.cs.
| Command | Purpose |
|---|---|
just pack |
Updates the version, then packs the NuGet package into artifacts/. |
just pipeline-local-release |
Packs and publishes to a local NuGet feed (see the Justfile note on argument quoting for the feed path). |
just pipeline-release |
Full release pipeline (build, test, pack, publish, GitHub release). |
Before a release, validate locally:
just pipeline-pr— restore, build, lint, tests.just build-s && just test-s— sample solution build and tests.just pipeline-local-release— confirm the pack + local publish succeed.
- Bump the version in
package.json. - Run
just update-versionto sync docs/samples. - Push a PR with the version bump; merge to
main. release.ymlpublishes the release automatically.
The legacy
scripts/setup-release.*files describe a changeset-based (@changesets/cli) flow that is not used by this repository. They are retained for reference only; the actual release automation lives in.github/workflows/pr.ymland.github/workflows/release.yml.