-
-
Notifications
You must be signed in to change notification settings - Fork 3
Release Management
This document outlines the release policy for ThorVG.Swift, including versioning, release cadence, testing requirements, and procedures. The information about ThorVG.Swift's official release managers are as follows:
ThorVG.Swift follows Semantic Versioning 2.0.0 (SemVer):
MAJOR.MINOR.PATCH
- MAJOR: Incremented for incompatible API changes
- MINOR: Incremented for new functionality in a backwards-compatible manner
- PATCH: Incremented for backwards-compatible bug fixes
During the initial development phase (versions 0.x.x), the project is considered unstable:
- Minor version bumps (0.1.0 → 0.2.0) may include breaking changes
- Patch version bumps (0.1.0 → 0.1.1) should be backwards-compatible
- Breaking changes should be clearly documented in release notes
Once version 1.0.0 is released:
- The public API is considered stable
- Breaking changes only in major version bumps (1.x.x → 2.0.0)
- Deprecation warnings should be added one minor version before removal
- Full adherence to semantic versioning principles
Stable releases are tagged with version numbers (e.g., v0.1.0, v1.0.0) and include:
- Pre-built XCFramework binaries
- Comprehensive release notes
- Full test coverage passing
- Documentation updates
Beta releases may be used for testing major features:
- Tagged with beta suffix (e.g.,
v0.2.0-beta.1) - Not recommended for production use
- Solicits community feedback
- May have known issues documented
During the initial development phase:
- Patch releases: As needed for critical bugs
- Minor releases: When significant new features are ready
- No fixed schedule: Prioritizing quality over frequency
After reaching v1.0.0:
- Patch releases: Within 1-2 weeks for critical bugs
- Minor releases: Every 2-3 months with new features
- Major releases: As needed for breaking changes (ideally 12+ months between)
Every release must meet these requirements before being published:
- All tests pass on macOS
- All tests pass on iOS Simulator
- All tests pass on iOS Device (manual verification)
- No compiler warnings
- No linter errors
- Code review completed (for PRs)
- docs/CHANGELOG.md updated with all changes
- README.md updated if needed
- API documentation updated for new/changed features
- Migration guide created for breaking changes (if applicable)
- Version numbers updated in documentation examples
- XCFramework builds successfully for all platforms:
- macOS (arm64 + x86_64)
- iOS Device (arm64)
- iOS Simulator (arm64)
- XCFramework size is reasonable (documented if significantly changed)
- Sample app builds and runs with the new XCFramework
- Unit tests pass
- Snapshot tests pass (visual regression)
- Sample app tested manually
- Performance benchmarks run (for significant changes)
- Memory leak checks performed
- Package.swift has correct version references
- Package builds successfully via SPM
- Package resolves dependencies correctly
- Integration test in a fresh project succeeds
The release process is automated using the scripts/release.sh script. Follow these steps:
# Ensure you're on the main branch
git checkout main
git pull origin main
# Verify everything is up to date
git status
# Run full test suite
swift build
swift test
# Test in Xcode (iOS)
open Package.swift
# Run tests in Xcode with iOS Simulator (⌘+U)
# Test sample app
open ThorVGSampleApp/ThorVGSampleApp.xcodeproj
# Build and run (⌘+R), verify all examples workUpdate the following files before creating the release:
Create a new entry at the top of docs/CHANGELOG.md:
## [0.1.0] - 2024-XX-XX
### Added
- New feature descriptions
- API additions
### Changed
- Modified behaviors
- API changes
### Fixed
- Bug fixes
### Breaking Changes
- List any breaking changes (for v0.x releases)- Update version numbers in installation examples
- Update supported ThorVG version if changed
- Add any new features to the feature list
- Update documentation links if needed
If you have version constants in your code, update them:
- Check for hardcoded version strings
- Update build scripts if they embed version info
# Create the release (replace 0.1.0 with your version)
./scripts/release.sh 0.1.0The script will:
- ✅ Validate version format (semantic versioning)
- ✅ Check for uncommitted changes
- ✅ Verify the tag doesn't already exist
- ✅ Build the XCFramework for all platforms
- ✅ Create a release commit with the XCFramework
- ✅ Create an annotated git tag
- ℹ️ Provide instructions for next steps
# Review the release commit
git show HEAD
# Review the tag
git show v0.1.0
# Push the tag to GitHub
git push origin v0.1.0Important: Only push the tag, not the main branch. The release commit with the XCFramework should only exist in the tagged commit.
- Go to: https://github.com/thorvg/thorvg.swift/releases/new?tag=v0.1.0
- Title:
ThorVG.Swift v0.1.0 - Copy the relevant section from docs/CHANGELOG.md into the release notes
- Enhance with:
- Highlights: Call out major features
- Breaking Changes: Prominently display any breaking changes
- Migration Guide: Link to migration guide if applicable
- Thanks: Acknowledge contributors
- Check "Set as the latest release" (or "Pre-release" for beta)
- Click "Publish release"
# Reset your local branch to remove the XCFramework from working tree
git reset --hard HEAD~1
# Verify you're back to normal development state
git status
ls ThorVG.xcframework # Should not exist in working directoryThe XCFramework only exists in the tagged commit, keeping the main branch lightweight.
- Announce release on Discord/social media
- Update package indices if applicable
- Monitor for issues in the first 24-48 hours
- Respond to GitHub issues related to the release
- Start planning next release milestone
For critical bugs in production releases:
- Security vulnerabilities: Immediate hotfix required
- Critical bugs: Breaking core functionality
- Build failures: Package doesn't build for users
- Data corruption: Issues that could cause data loss
-
Create a hotfix branch from the latest release tag:
git checkout -b hotfix/v0.1.1 v0.1.0
-
Make the minimal fix required (only the critical bug)
-
Test thoroughly:
swift build swift test # Test in Xcode with iOS Simulator
-
Update docs/CHANGELOG.md with the hotfix
-
Merge to main:
git checkout main git merge hotfix/v0.1.1
-
Create the hotfix release:
./scripts/release.sh 0.1.1 git push origin v0.1.1
-
Create GitHub release with clear explanation of the fix
When deprecating API elements:
- Deprecations are allowed in minor versions
- Must provide alternatives in deprecation notice
- Can be removed in the next minor version
- Should be documented in CHANGELOG under "Deprecated"
- Mark as deprecated with
@availableannotations:@available(*, deprecated, message: "Use newFunction() instead") func oldFunction() { }
- Deprecation warnings must exist for at least one minor version
- Example: Deprecated in v1.2.0, can remove in v2.0.0
- Provide clear migration path in documentation
For any breaking changes:
- docs/CHANGELOG.md: Dedicated "Breaking Changes" section
- GitHub Release Notes: Prominent callout at the top
-
Migration Guide: Create
docs/MIGRATION_vX.mdfor major versions - Deprecation Warnings: Add one version before removal when possible
# Migration Guide: v0.x to v1.0
## Breaking Changes
### Change 1: API Renamed
**Before:**
\```swift
let lottie = Lottie.load(path: "animation.json")
\```
**After:**
\```swift
let lottie = try Lottie(path: "animation.json")
\```
**Reason:** Provides clearer error handling and follows Swift conventions.Use this checklist for every release:
## Release Checklist: v0.1.0
### Pre-Release
- [ ] All tests pass (macOS)
- [ ] All tests pass (iOS Simulator)
- [ ] Sample app works correctly
- [ ] docs/CHANGELOG.md updated
- [ ] README.md updated (version numbers)
- [ ] No uncommitted changes
- [ ] Documentation reviewed
### Build
- [ ] `./scripts/release.sh 0.1.0` executed successfully
- [ ] XCFramework built for all platforms
- [ ] Release commit created
- [ ] Git tag created
### Publish
- [ ] Tag pushed to GitHub: `git push origin v0.1.0`
- [ ] GitHub release created
- [ ] Release notes written
- [ ] Release marked as latest (or pre-release)
### Post-Release
- [ ] Local environment cleaned (`git reset --hard HEAD~1`)
- [ ] Release announcement posted
- [ ] Monitoring for issues
- [ ] Next milestone plannedThis section will be maintained as releases are published:
-
v0.1.0 (2025-11-15): Initial public release
- Lottie animation rendering
- SwiftUI and UIKit views
- iOS 13.0+, macOS 10.15+ support
- Pre-built XCFramework distribution
If a critical issue is discovered immediately after release:
- Do NOT delete the tag/release (breaks SemVer promise)
- Instead, create an immediate hotfix release
- Document the issue in GitHub release notes
- Notify users via announcements
For security vulnerabilities:
- Do NOT publish details publicly before fix is available
- Create a private fix
- Release hotfix as quickly as possible
- Coordinate disclosure with security best practices
- Consider creating a SECURITY.md policy
- Semantic Versioning 2.0.0
- Keep a Changelog
- Swift Package Manager Documentation
- GitHub Release Best Practices
Last Updated: 2024-11-15 Maintainers: @andyf (add maintainer handles)