release-automation
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 fo
release
automation
SKILL.md.claude/skills/release-automation
GitHub<!-- docval:ignore-workflow-refs -->
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
- Detect breaking changes in the public API during code review (no automated gate)
- Record public-surface changes in CHANGELOG.md
- Verify consumer plugins compile against the re-pinned Common submodule (the de-facto compatibility check)
- 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 (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 Framework: net8.0
- Packages:
- Lidarr.Plugin.Abstractions (host-owned ABI)
- Lidarr.Plugin.Common (main library)
- Publishing: NuGet.org + GitHub Packages
- API Validation: review + CHANGELOG.md; consumer plugins compile Common from a pinned source submodule, so breaking changes fail at plugin compile on re-pin (no analyzer/apicompat gate — removed 2026-06, see docs/reference/PUBLIC_API_BASELINES.md)
- 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
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
- Public-surface changes reviewed and recorded in CHANGELOG.md
- CHANGELOG updated with breaking changes
- Documentation current
- Examples updated
Release Execution:
- Create version tag
- Trigger release workflow
- Build for all TFMs
- Pack NuGet packages
- 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
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
There is no automated tool. To check compatibility, re-pin the Common submodule in a consumer plugin (e.g. Qobuzarr or Tidalarr) and build it — removals and signature changes fail the plugin compile. Record every public-surface change in CHANGELOG.md.
Workflow Integration
GitHub Actions Release Flow
- Trigger: Tag push
v*.*.*or manual dispatch - Build: Restore and build for net8.0
- Test: Run test suite (with timing flake filters on tags)
- Pack: Create NuGet packages with ContinuousIntegrationBuild=true
- Publish: Push to NuGet.org (if NUGET_API_KEY present)
- Release: Create GitHub release
Release Checklist
- Update version in both csproj files
- Update CHANGELOG.md with categorized changes (including all public-surface changes)
- Update documentation for new features
- Run tests locally:
dotnet test - Check API compatibility: re-pin the Common submodule in a consumer plugin and build it
- 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
Consumer Plugin Fails to Compile After Re-pin
Problem: New version breaks the API contract (plugin build errors on submodule re-pin) Solution:
- Identify the removed/changed public types or members from the compile errors
- If breaking: Bump MAJOR version
- Document breaking changes in CHANGELOG and docs/migration/BREAKING_CHANGES.md
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
Build Issues (net8.0)
Problem: Build fails for net8.0 (net6.0 is retired; net8.0 is the only TFM) 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 and docs/migration/BREAKING_CHANGES.md
- Update both csproj versions to 1.3.0
- Create migration guide in docs/migration/
- Re-pin the Common submodule in a consumer plugin and build to confirm the expected breakage surface
- Commit and create tag v1.3.0
- Monitor release workflow
- Publish to NuGet.org
- Create GitHub release with migration notes
- Update consuming projects
Example 2: Fix API Compatibility Error
User: "A consumer plugin no longer compiles after re-pinning Common" Action:
- Review the plugin compile errors to identify the changed public surface
- Identify breaking vs. non-breaking changes
- If breaking: Ensure MAJOR version bump
- Update CHANGELOG.md with breaking change details and add a row to docs/migration/BREAKING_CHANGES.md
- 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