Skip to content

Releasing

A PiSharp release is a Git tag. Pushing a v* tag runs release.yml, which tests, packs and publishes everything. Most of the work is the preparation before the tag: the version, the notes, and the records the website and the release scripts read. This page describes the process as the repository’s files and past release commits show it.

PiSharp’s version is the Pi version it matches, and a fourth number marks a C#-only patch on the same baseline: 1.2.0 and 1.5.0 are the Pi v1.2.0 and v1.5.0 syncs, and 1.2.0.1 and 1.2.0.2 added C# work on top of 1.2.0. See Versioning.

The release scripts enforce this:

  • The version must match ^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9A-Za-z.-]+)?$.
  • Its first three numbers must equal the tag in compatibility/target.lock.json (v1.6.0 today). A sync to a new Pi release therefore comes before its release. See How the port tracks Pi.
  • A version with a - suffix becomes a GitHub prerelease.

Every assembly gets the release version, except PiSharp.ExtensionHost, which keeps assembly version 1.0.0.0.

Releases are prepared on a release/<version> branch, such as release/1.5.0, and merged into main with a pull request. The preparation commit touches these files:

File Change
Directory.Build.props Set VersionPrefix to the new version.
docs/release-notes/<version>.md The full release notes. The GitHub release uses this file as its body.
website/src/content/changelog/<version>.md The short changelog entry for the changelog page. See Changelog entries.
CHANGELOG.md Regenerate it from the website entries. See below.
compatibility/public-release.json Set version, proposedReleaseTag and releaseCandidate (branch, decision, experimental parts, notes and changelog paths), reset publication to false, and move the previous release into previousReleases.
docs/plans/full-parity-progress.json Mark the previous release published with its tag and date, and add an entry for the new one with status release-candidate.
README.md, THIRD-PARTY-NOTICES.md Update the version and any new third-party notices.
Decision records and compatibility/* Record what ships, for example the decision’s status and the sync rows that name the release.
website/src/data/packages.ts, website/src/data/parity.json, website/src/pages/*.astro Update the package list, the parity page and the pages that name the version.
Docs pages with version pins Update every PackageReference and version mention. Find them with git grep -n "<previous version>" -- website/src.

A separate commit then re-seals the derivative integrity table, because Directory.Build.props, README.md, THIRD-PARTY-NOTICES.md and other files above are pinned there. See Derivative integrity pins.

Release 1.6.0.1 is a C#-only patch on the Pi v1.6.0 and Pi Durable 1.6.0 baseline, publishing 29 libraries, the CLI tool, and PiSharp.Templates (31 packages). Tag v1.6.0.1 identifies source 1a74a207b30613444d5f8ef884957e7580860539. The publication record records exact-tag validation (run 45198502548) and official NuGet verification (run 45207181360).

Release 1.6.0 publishes 28 libraries plus the CLI (29 packages) on the Pi v1.6.0 and Pi Durable 1.6.0 baseline. Tag v1.6.0 identifies source 711aa190dc2f4e339cf9232db48f70d8102504ff. The publication record records exact-tag validation and official NuGet verification.

Release 1.5.2 publishes 28 libraries plus the CLI (29 packages) on the Pi v1.5.2 baseline. Tag v1.5.2 identifies source f786a55dc32d1767ac220ed1ad4c44748bccba97. The publication record records exact-tag validation and official NuGet verification.

Release 1.5.0.1 keeps the Pi v1.5.0 source pin and publishes 28 libraries plus the CLI (29 packages). Chord, Chord.Hosting, Durable.Store, Env.Protocol and Env are added experimental libraries. Validation of all 29 archives and a fresh external consumer of the five new libraries passed against the release source and exact sibling references. Three qualified native daemon ZIPs remain separate from NuGet.

Tag v1.5.0.1 identifies immutable source 8144e3eaa138a5faf56f5cbb0de477a56fd48f8f. The publication record records actual package/release verification and asset integrity. compatibility/public-release.json preserves the complete 1.5.0 record in previousReleases. For future candidates, keep publication flags false and status: in-progress until publication is verified; only then promote the changelog and its RSS entry.

CHANGELOG.md ships next to the CLI, where What’s New and /changelog read it. It is generated from website/src/content/changelog/*.md, newest version first, as ## [version] - date sections in Pi’s format, with site-relative links made absolute. The InteractiveParity case changelog.sync.generated-from-website fails when the file is out of date. With PISHARP_WRITE_CHANGELOG=1, it rewrites the file instead:

Terminal window
$env:PISHARP_WRITE_CHANGELOG = '1'
$env:INTERACTIVEPARITY_FILTER = 'changelog.'
dotnet run --project tests/PiSharp.InteractiveParity.Tests -c Release
Remove-Item Env:PISHARP_WRITE_CHANGELOG, Env:INTERACTIVEPARITY_FILTER

The file is written as UTF-8 without a byte order mark, with LF line endings.

The package list is written out in several places. A new library needs all of them:

File Change
tools/release/build-release-packages.ps1 Add it to $libraries, in dependency order. The script packs exactly this list plus the CLI.
tools/release/PiSharp.NativeSdk.targets Add it to the PiSharpNativeSdkPackage condition, and give it a Description.
tools/release/native-sdk-package.ps1 Add it to the allowed package ids, its PiSharp dependencies to $siblings, its third-party pins to $external, and any license files it must carry.
website/src/data/packages.ts List it on the SDK page.
release.yml If the CLI tool carries the new assemblies, add them to the tool payload check.

native-sdk-package.ps1 also expects the provenance SDK version 10.0.401. Update it with global.json when the SDK changes.

Run the release workflow by hand from the Actions tab to build and check a version without publishing anything. Set version explicitly to the intended version; 1.6.0.1 is the latest published version. It takes three inputs:

Input Default Effect
version 1.6.0.1 The version to build and validate.
skip_tests false Skip the 23 release-list suites in a dry run. Core and Durable validation still run.
include_standalone false Also build self-contained standalone archives (win-x64, linux-x64, osx-arm64) and Homebrew/Scoop/Winget manifests.

A dry run runs the build and the reusable validation gates. The publish and GitHub release jobs run only for a pushed tag.

You can also build the packages locally. See Install your build as a tool.

Once the release branch is merged, tag the merge commit and push the tag:

Terminal window
git tag v1.6.0 <qualified merge commit>
git push origin v1.6.0

release.yml has three packaging/publication jobs plus four reusable validation gates, each receiving the exact release github.sha. Required failures must be diagnosed and corrected before readiness is claimed. Local Windows receipts or a workflow definition do not establish hosted success. Separate web/browser suites are optional for this release path.

Gate Required evidence
core-validation / core.yml Core suites and provenance at the exact source SHA.
durable-validation / durable.yml Three-OS suites, zero-retention reruns, SQL Server, hosting/server checks and four SQLite publish RIDs.
gap-validation / gap-regressions.yml Registered gap/Chord/Env suites, exact case/skip ledgers, production Pi runtime installer and fresh-cache provenance.
native-env-validation / env-native.yml Native daemon publish, notices/integrity and real platform smoke/PTY checks. Windows verifies explicit PTY ENOTSUP.

The build/package validation is also required. The package inventory (29 packages in published 1.6.0; 31 packages from 1.6.0.1 with PiSharp.Extensions.AI and PiSharp.Templates) and new-library consumer gate must pass against the intended candidate sources. A successful platform job covers its tested toolchain/ABI, not additional RIDs or older operating systems. Review actual logs and artifacts before marking the candidate ready.

The build job runs on Ubuntu with the SDK from global.json and Node.js 22. It takes the version from the tag, without the v, and then:

  1. Runs the 23 offline release suites with dotnet run: the 20 suites the macOS workflow runs, plus Durable, DurableCli and CustomAgents. A tag push always runs them. See Tests.
  2. Runs build-release-packages.ps1 with the version and the commit. See Build the packages.
  3. Smoke-tests PiSharp.Templates via tools/ci/test-templates.ps1 (installs the packed template package into an isolated hive, scaffolds, builds, and runs all three templates against the local packages).
  4. Checks the CLI tool’s durable payload: the durable and SQLite assemblies and their license files must be in the package, the e_sqlite3 native library for win-x64, linux-x64, linux-musl-x64 and osx-arm64 must match the SQLitePCLRaw package byte for byte, no native .pdb files may be present, and the archive must stay within the 80 MiB budget.
  5. Uploads the packages and the validation reports as the packages artifact.

The publish job runs in the nuget environment and uses NuGet trusted publishing. NuGet/login exchanges the run’s OIDC token for a short-lived API key for the account in the NUGET_USER repository variable, so no long-lived key is stored. It then pushes every package:

Terminal window
dotnet nuget push "artifacts/packages/*.nupkg" --api-key <short-lived key> --source https://api.nuget.org/v3/index.json --skip-duplicate

--skip-duplicate lets a rerun skip the packages that already went up.

After the publish job succeeds, the release job creates the GitHub release for the tag, titled PiSharp <version>, with --verify-tag. Its body is docs/release-notes/<version>.md, or generated notes if that file doesn’t exist. The packages are attached.

tools/release/build-release-packages.ps1 needs PowerShell 7.

Parameter Default Meaning
-Version (required) The release version.
-SourceCommit (required) The full 40-character commit the packages come from.
-OutputDirectory artifacts/packages Where the packages go.
-PackageSource https://api.nuget.org/v3/index.json The feed restore uses, since NuGet.Config clears every feed.

It writes provenance files to artifacts/release-inputs/, recording the commit, version, Pi baseline and SDK. Then it packs:

  • The current 29-library admission list (28 libraries in published 1.6.0, plus PiSharp.Extensions.AI from 1.6.0.1), with tools/release/PiSharp.NativeSdk.targets. The targets file sets the package id, version, description, license, readme and notices, embeds the provenance, and fails without a version, a commit, the provenance file or net10.0. Each package is checked by Assert-PiSharpNativeSdkPackage: its members, its dependencies (PiSharp siblings at exactly the release version, [<version>], so a consumer can’t mix packages from different releases, as Pi pins its own packages from 1.3.0; third-party packages at their pinned versions or approved inclusive minimum ranges) and its assembly. The targets file is what makes dotnet pack write [<version>] for project references; NuGet would otherwise write the release version as a minimum.
  • The CLI, as the PiSharp.Cli tool with the command pisharp, with tools/packaging/PiSharp.Distribution.targets, checked by tools/packaging/validate-distribution.ps1.
  • The PiSharp.Templates dotnet new template package (templates/PiSharp.Templates.csproj), checked by Assert-PiSharpTemplatesPackage.

The reports go to artifacts/validation/. From 1.6.0.1 the list contains 29 libraries, the CLI tool, and the template package (31 packages; 1.5.0.1 through 1.6.0 contained 29 packages, and earlier 1.5.0 contained 24 packages). The script checks its exact library-list count. Chord, Chord.Hosting, Durable.Store, Env.Protocol and Env additionally require the package-only external consumer gate documented in docs/contracts/gap-package-admission.md. The Env daemon is a separately verified native artifact, never a library package.

Record the publication in compatibility/public-release.json: set tagCreated, binaryReleasePublished and nugetPackagesPublished to true, and add publishedOn, tagCommit and releaseRun. The website reads this file to show the current release. Until nugetPackagesPublished is true, it shows the last release in previousReleases that has it.

docs/release/ holds design records from before the current pipeline. No workflow uses the scripts they describe; tests/release/ still tests those scripts.

Document Describes
native-sdk-private-packages.md The first proposal for private native SDK packages.
r296-artifact-metadata-leaf.md ReleaseArtifactManifest.ps1, a manifest validator for four payload profiles.
r297-artifact-byte-admission.md ReleaseArtifactFiles.ps1, hash and length checks of staged payload files.
standalone-release.md standalone-release.ps1, helpers for self-contained archives for win-x64, linux-x64 and osx-arm64.
windows-native-tool.md A framework-dependent Windows tool profile.