This directory contains the GitHub Actions workflows for the Forma project, designed for optimized NuGet package releases using Nerdbank.GitVersioning.
release_vX.Ybranches: Stable version releases (no preview suffix)developbranch: Preview version releases (with-previewsuffix)mainbranch: Not used for releases (CI/CD only)
-
nuget-publish-reusable.yml- Centralized reusable workflow for NuGet publishing- Handles build, test, pack, and publish steps
- Configurable project paths and test filters
- Uploads artifacts for debugging
-
build-test.yml- Continuous integration workflow- Runs on push/PR to main, develop, and release branches
- Builds and tests all projects
- Manual trigger available
-
benchmarks.yml- Performance benchmarking- Weekly scheduled runs
- Manual trigger available
- Uploads benchmark results as artifacts
-
release-core.yml- Releases core packages (Forma.Core, Forma.Mediator, Forma.Decorator)- Automatic change detection
- Sequential dependency-aware publishing
- Manual trigger with force-publish option
-
release-chains.yml- Releases Forma.Chains package- Change detection for chains-specific files
- Manual trigger with force-publish option
-
release-pubsub.yml- Releases Forma.PubSub.InMemory package- Change detection for pubsub-specific files
- Manual trigger with force-publish option
-
release-all.yml- Manual release workflow for all packages- Selective package publishing (individual or all)
- Force-publish option
- Comprehensive release summary
- Create a release branch:
git checkout -b release_v1.2 - Push changes: Changes are automatically detected and relevant packages are published
- Develop branch: Push to develop for preview releases
- Individual packages: Use
release-core.yml,release-chains.yml, orrelease-pubsub.yml - Multiple packages: Use
release-all.ymlwith package selection - Force publish: Use the force-publish option to override change detection
NUGET_API_KEY- NuGet.org API key for publishingNUGET_SOURCE- (Optional) Custom NuGet source URL
The workflows use path filters to detect changes:
- Core packages: Monitor
src/Forma.Core/**,src/Forma.Mediator/**,src/Forma.Decorator/** - Chains package: Monitor
src/Forma.Chains/** - PubSub package: Monitor
src/Forma.PubSub.InMemory/** - Global: Monitor
Directory.Build.props,version.json
Versions are automatically managed by Nerdbank.GitVersioning:
- Stable releases:
release_vX.Ybranches produceX.Y.Zversions - Preview releases:
developbranch producesX.Y.Z-preview.Nversions - Build metadata: Includes commit information for traceability
nuget-publish-reusable.yml (base workflow)
├── release-core.yml (uses reusable)
├── release-chains.yml (uses reusable)
├── release-pubsub.yml (uses reusable)
└── release-all.yml (uses reusable)
- Failed builds: Check the build-test workflow first
- Version conflicts: Verify Nerdbank.GitVersioning configuration in
version.json - Missing secrets: Ensure
NUGET_API_KEYis configured in repository settings - Change detection: Review path filters if packages aren't being published when expected