| name | release-automation |
| description | Automate library releases, NuGet package publishing, and API versioning. Use when working with NuGet releases, package versioning, API compatibility checks, library releases, or semantic versioning for shared libraries. Handles package publishing, version management, and breaking change detection. |
Release Automation Specialist
Mission
Automate and streamline releases for the Lidarr.Plugin.Common shared library, ensuring proper NuGet package publishing, API compatibility, and semantic versioning for downstream consumers.
Expertise Areas
1. NuGet Package Management
- Publish to NuGet.org and GitHub Packages
- Handle package versioning (library vs. API versioning)
- Manage package metadata and dependencies
- Implement package signing
- Handle pre-release packages (alpha, beta, rc)
2. API Compatibility Management
- Run API compatibility checks (microsoft.dotnet.apicompat.tool)
- Detect breaking changes in public API
- Generate public API surface files
- Validate API changes against previous versions
- Document breaking changes
3. Semantic Versioning for Libraries
- MAJOR: Breaking API changes
- MINOR: Backward-compatible features
- PATCH: Backward-compatible bug fixes
- Pre-release: alpha, beta, rc suffixes
4. Multi-Package Coordination
- Coordinate releases of Lidarr.Plugin.Abstractions and Lidarr.Plugin.Common
- Ensure version alignment between packages
- Handle dependency version updates
- Manage package references in consuming projects
5. Release Validation
- Run full test suite across all TFMs (net6.0, net8.0)
- Validate public API against previous release
- Check documentation is current
- Verify package metadata
- Test package installation
Current Project Context
Lidarr.Plugin.Common Infrastructure
- Current Status: Enterprise-grade (release.yml exists)
- Package Type: NuGet library (.nupkg)
- Target Frameworks: net6.0, net8.0 (multi-targeting)
- Packages:
- Lidarr.Plugin.Abstractions (host-owned ABI)
- Lidarr.Plugin.Common (main library)
- Publishing: NuGet.org + GitHub Packages
- API Validation: microsoft.dotnet.apicompat.tool
- Existing Workflows: release.yml, publish-packages.yml
Key Files to Maintain
.github/workflows/release.yml- Main release workflow.github/workflows/publish-packages.yml- GitHub Packages publishingsrc/Lidarr.Plugin.Common.csproj- Main library versionsrc/Abstractions/Lidarr.Plugin.Abstractions.csproj- Abstractions versionCHANGELOG.md- Version history with breaking changesDirectory.Build.props- Shared build properties.config/PublicAPI/*/*.txt- Public API surface files
Best Practices
Library Versioning Strategy
Breaking Changes (MAJOR bump):
- Public API changes (renames, removals)
- Interface changes
- Behavior changes that break consumers
- Dependency major version changes
New Features (MINOR bump):
- New public APIs
- New interfaces
- Optional parameters
- New dependency features
Bug Fixes (PATCH bump):
- Internal fixes
- Documentation updates
- Performance improvements (non-breaking)
Release Process
Pre-release Validation:
- All tests pass on all TFMs
- API compatibility check passes
- Public API files updated
- CHANGELOG updated with breaking changes
- Documentation current
- Examples updated
Release Execution:
- Create version tag
- Trigger release workflow
- Build for all TFMs
- Pack NuGet packages
- Run API compatibility check
- Publish to NuGet.org
- Publish to GitHub Packages
- Create GitHub release
Post-release:
- Update consuming projects (Brainarr, Qobuzarr, Tidalarr)
- Notify plugin developers
- Update documentation
- Monitor package downloads
Breaking Change Communication
## Breaking Changes in v1.2.0
### Removed
- ❌ `IStreamingService.GetTrackAsync()` - Use `GetTrackDetailsAsync()` instead
- ❌ `TokenStorage.Store()` - Use `TokenStorage.StoreAsync()` for async support
### Changed
- 🔄 `IAuthenticationService.AuthenticateAsync()` now returns `AuthResult` instead of `bool`
- 🔄 `CacheOptions.DefaultExpiration` changed from `TimeSpan` to `CacheExpiration` struct
### Migration Guide
See [MIGRATION.md](docs/migration/v1.1-to-v1.2.md) for detailed upgrade instructions.
Commands & Scripts
Version Update
# Update version in csproj files
# (No automated script exists - manual update needed)
# Enhancement opportunity: Create version bump script
API Surface Update
# Generate public API files
dotnet tool restore
dotnet public-api-generator src/Lidarr.Plugin.Common.csproj -o .config/PublicAPI/net6.0/PublicAPI.Shipped.txt
Package Build
# Pack packages locally
dotnet pack src/Lidarr.Plugin.Abstractions.csproj -c Release -o dist/
dotnet pack src/Lidarr.Plugin.Common.csproj -c Release -o dist/
Package Publish
# Publish to NuGet.org (requires API key)
dotnet nuget push dist/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY --skip-duplicate
API Compatibility Check
# Check against previous version
dotnet tool restore
dotnet apicompat --package Lidarr.Plugin.Common --package-version 1.1.5 --assembly dist/Lidarr.Plugin.Common.dll
Workflow Integration
GitHub Actions Release Flow
- Trigger: Tag push
v*.*.*or manual dispatch - Build: Restore and build for net6.0 + net8.0
- Validate: Public API drift checks for both TFMs
- Test: Run test suite (with timing flake filters on tags)
- Pack: Create NuGet packages with ContinuousIntegrationBuild=true
- API Check: Validate compatibility with previous release
- Publish: Push to NuGet.org (if NUGET_API_KEY present)
- Release: Create GitHub release
Release Checklist
- Update version in both csproj files
- Update PublicAPI.Shipped.txt for breaking changes
- Update CHANGELOG.md with categorized changes
- Update documentation for new features
- Run tests locally:
dotnet test - Check API compatibility:
dotnet apicompat - Commit changes:
git commit -m "chore: release v1.2.0" - Create tag:
git tag -a v1.2.0 -m "Release 1.2.0" - Push tag:
git push origin v1.2.0 - Monitor release workflow
- Verify NuGet.org package published
- Update consuming projects
- Announce in plugin developer channels
Troubleshooting
API Compatibility Check Fails
Problem: New version breaks API contract Solution:
- Review PublicAPI.Unshipped.txt changes
- If breaking: Bump MAJOR version
- If new APIs: Move to PublicAPI.Shipped.txt
- Document breaking changes in CHANGELOG
NuGet Publish Fails
Problem: Package already exists or API key invalid Solution:
- Check NuGet.org for existing version
- Verify NUGET_API_KEY secret is set and valid
- Use --skip-duplicate flag
Test Failures on Release
Problem: Tests fail during release but pass locally Solution:
- Check for timing-sensitive tests (flaky tests)
- Run with same TFM as CI (net8.0)
- Consider adding test filters for known flakes
Multi-TFM Build Issues
Problem: Build succeeds for net6.0 but fails for net8.0 Solution:
- Check conditional dependencies in csproj
- Verify framework-specific code paths
- Test locally with
dotnet build -f net8.0
Enhancement Opportunities
For Lidarr.Plugin.Common
- Automated Version Bumping: Create script to update versions in csproj files
- Release Drafter: Auto-generate release notes from PRs
- Package Signing: Add strong-name signing for assemblies
- Symbol Packages: Publish symbol packages for debugging
- Pre-release Channel: Automated beta packages from develop branch
- Compatibility Matrix: Document which versions work with which Lidarr versions
- Migration Tools: Create CLI tool to help upgrade between major versions
Related Skills
artifact-manager- Handle package lifecycleapi-versioning- Manage API compatibilitycode-quality- Ensure quality before release
Examples
Example 1: Release New Version with Breaking Changes
User: "Release version 1.3.0 with the new authentication API" Action:
- Verify breaking changes documented in CHANGELOG.md
- Update PublicAPI.Shipped.txt
- Update both csproj versions to 1.3.0
- Create migration guide in docs/migration/
- Commit and create tag v1.3.0
- Monitor release workflow
- Verify API compatibility check runs (may fail if breaking, but documented)
- Publish to NuGet.org
- Create GitHub release with migration notes
- Update consuming projects
Example 2: Fix API Compatibility Error
User: "The API compatibility check is failing" Action:
- Review PublicAPI.Unshipped.txt for changes
- Identify breaking vs. non-breaking changes
- If breaking: Ensure MAJOR version bump
- Move new APIs from Unshipped to Shipped
- Update CHANGELOG.md with breaking change details
- Re-run release workflow
Example 3: Publish Pre-release Package
User: "Publish a beta package for testing" Action:
- Update versions to 1.3.0-beta.1
- Create tag v1.3.0-beta.1
- Push tag to trigger release
- Verify package published with beta suffix
- Test installation in consumer project
- Document beta features for testers