C# ModularPipelines project that replaces the YAML-heavy CI steps previously driven by pipenv run pyrevit ....
- .NET 10 SDK (preinstalled on
windows-2025runners) dotnet,msbuild,goon PATH- Inno Setup 6 (
ISCC.exe) for installer builds — preinstalled onwindows-2025 - WiX Toolset v3.x build tools for the legacy CLI MSI project — preinstalled on
windows-2025 chocofor Chocolatey packaging/publishwingetcreatefor WinGet manifest updates (release publish workflow)- Azure Trusted Signing credentials for
signsteps (production only)
If a dev clone is attached to this repository, close Revit before running dotnet run -c Release -- ci. Revit loads engine DLLs from bin/netfx/engines/ and blocks in-place updates (same constraint as core DLL updates in pyRevit).
If the build fails with MSB3021 on paths under bin/netfx/engines/..., close Revit and retry.
Open pyRevit.Build.slnx in Visual Studio to inspect or debug the build project.
From the repository root:
cd build
dotnet run -c Release -- ciThe ci pipeline mode replaces pipenv run pyrevit build products (and the old CI stamping steps on the main repo). It builds all product DLLs, tools, and engines into bin/:
cd build
# Unsigned product build (no version stamping; Channel=none by default)
dotnet run -c Release -- ci
# WIP-style stamping + product build (matches develop push on the main repo)
$env:Build__Channel = 'wip'
dotnet run -c Release -- ci
# Release-style stamping + product build (matches master / tag CI on the main repo)
$env:Build__Channel = 'release'
$env:DOTNET_ENVIRONMENT = 'Production'
dotnet run -c Release -- ciDebug configuration (legacy pipenv run pyrevit build products Debug):
dotnet run -c Debug -- ciOutputs land under bin/ (netfx/, netcore/, engines, CLI, doctor, autocomplete, etc.). LibGit2 native DLL verification runs at the end of ci.
Channel=none (the default) is valid for unsigned local builds and fork PR validation. The pipeline seeds bin/pyrevit-products.json from release/pyrevit-products.json before building labs.
On a clean checkout (no tracked bin/), ci builds in this order:
- Seed
bin/pyrevit-products.jsonfromrelease/(stamping may update it whenBuild__Channeliswiporreleaseon the main repo) - Labs (
pyRevitLabs.sln+ CLI/doctor) - IronPython deps → seeds
bin/*/engines/IPY2712PR/fromdev/modules/ - Loaders (
pyRevitLoader.*, not runners) - Runtime (
pyRevitLabs.PyRevit.Runtime.sln) - Runners (
pyRevitRunner.*) - Static assets from
release/
This mirrors the legacy pipenv run pyrevit build deps + build engines + build runtime sequence.
The bin/ directory is not tracked in git. It is produced locally by dotnet run -- ci or downloaded by pyrevit clone / pyrevit clones update from public GitHub Release assets on the ci-binaries tag (unsigned-bin-{sha}.zip). Only develop and master are supported for CI binary download. Static assets are staged from release/bin-assets/ and release/cengines/; host/product JSON templates live under release/. Contributors edit release/pyrevit-hosts.json, not files under bin/.
Full copy-paste commands for run in Revit (CI binaries) vs C# contributor (local build): Developer Guide — Clone workflows.
Profile 1 — CI binaries (no local build):
pyrevit clone myclone --source <repo-url> --dest <parent-dir> --branch develop
pyrevit attach myclone default --installed
pyrevit clones update mycloneProfile 2 — local build (do not use pyrevit clone):
git clone <your-fork-url>
cd pyRevit
git checkout develop
git submodule update --init --recursive
cd build && dotnet run -c Release -- ci && cd ..
pyrevit clones add dev .
pyrevit attach dev default --installed
# after git pull:
pyrevit clones update dev --skip-binCI publishes unsigned-bin-<sha>.zip to the ci-binaries release and mirrors PyRevit.UnsignedBin on GitHub Packages (CLI fallback when GITHUBTOKEN is set). Release assets are pruned to the last 3 SHAs per branch (develop, master); NuGet package versions are pruned to the last 2 SHAs per branch. See CI/CD.
Run unit tests:
dotnet test tests/Build.Tests.csproj -c Release| Args | Purpose |
|---|---|
ci (default) |
Stamp versions, build products, verify LibGit2, stage release metadata (tag builds preserve the committed version; branch builds re-stamp) |
pack |
Restore CI-stamped metadata (if present), build Inno/MSI installers and Chocolatey package (requires bin/) |
sign |
Sign binaries, installers, and .nupkg via sign code trusted-signing |
publish |
Generate release notes, create draft GitHub release, push Chocolatey |
winget |
Generate WinGet manifests (machine-scope installers only), strip elevationProhibited if present, submit PRs to winget-pkgs |
notify |
Comment on linked GitHub issues |
Combine modes as needed, e.g. WIP pack+sign:
dotnet run -c Release -- pack signAfter downloading CI artifacts locally (bin/ + ci-stamped/ at the repo root), pack restores stamped installer/version files from ci-stamped/ before building installers.
Release (tag builds, after CI artifacts are restored):
dotnet run -c Release -- release pack sign publishNon-secret defaults live in appsettings.json. Override via environment variables:
| Variable | Purpose |
|---|---|
Build__Channel |
none, wip, or release |
Build__NotifyUrl |
URL posted to linked issues |
Signing__TenantId, Signing__ClientId, Signing__ClientSecret, Signing__Endpoint, Signing__SigningAccountName, Signing__CertificateProfileName |
Azure Trusted Signing |
Publish__ChocoToken |
Chocolatey push token |
Publish__WingetToken |
WinGet manifest submit token |
Publish__WingetReplaceVersion |
Optional previous catalog version for wingetcreate submit -r when replacing an older entry (must differ from the version being submitted) |
GITHUB_TOKEN |
GitHub API access for releases/notify |
GITHUBTOKEN |
Optional: pyRevit CLI fallback to Actions artifacts for private forks (actions:read) |
Set DOTNET_ENVIRONMENT=Production to load appsettings.Production.json.
On GitHub Actions, version stamping on the main repo is gated by Build__Channel and GITHUB_REPOSITORY == pyrevitlabs/pyRevit.
ci.yml—dotnet run -- ci+ unit testswip.yml—dotnet run -- pack signrelease.yml—dotnet run -- release pack sign publishwinget.yml—dotnet run -- winget(on release published)
The legacy Python CLI in dev/pyrevit.py remains available for local/manual workflows during transition.