Repository CI/CD
Repository CI/CD
Section titled “Repository CI/CD”This repository dogfoods the shared Purview.Build tool: it builds and packs the tool from source, installs the generated package, then runs purview-build against itself so the project builds and packs itself.
CI (ci.yml)
Section titled “CI (ci.yml)”Runs on pull requests and pushes to main:
- Check out the repository.
- Restore
src/Build.slnx. - Build gate:
dotnet build src/Build.slnx --configuration Release --no-restore --warnaserror. - Read and SemVer-validate the
package.jsonversion. - Pack the tool from source (
dotnet pack src/Build.slnx --configuration Release --no-build --output artifacts -p:Version=… -p:PackageVersion=…). - Install the packed tool from the
artifactssource into a temp tool path. - Dogfood: run the freshly installed
purview-buildagainst this repository (withGITHUB_TOKEN). The tool restores, builds, lints, runs tests, packs, and validates itself.
Release (release.yml)
Section titled “Release (release.yml)”Runs on push to main and is serialized by its own concurrency group (purview-build-release, cancel-in-progress: false):
- Read and SemVer-validate the
package.jsonversion; skip the whole job whenv{version}is already tagged (the tag check makes re-merges safe). - Restore and build
src/Build.slnxwith--warnaserror. - Pack the tool from source with
-p:ContinuousIntegrationBuild=true. - Verify the
NUGET__APIKEYsecret is set. - Install the packed tool.
- Run the release pipeline with
Release__Mode=NuGet,NuGet__FeedUrl=https://api.nuget.org/v3/index.json,Release__UploadArtifacts=true,Build__RunTests=false,Build__RunLint=false, andBuild__ValidatePack=true, passingGITHUB_TOKENandNUGET_APIKEY.
The tool therefore publishes the immutable package to nuget.org and tags and releases itself (v{version} + generated-notes GitHub release with the package attached) — exactly like every other purview-dev repository. Maintainers bump the package.json version and merge; they do not create release tags manually.
GitHub package visibility
Section titled “GitHub package visibility”GitHub initially creates NuGet packages as private. An organization owner should set the org default to Internal (Purview-Dev → Settings → Packages → Package Creation → Internal) and change any already-published package’s visibility in its Package settings → Danger Zone. See Release Flow for the exact steps and the gh api alternative.