We follow the GitFlow branching convention for professional development:
-
main: Production-ready releases- Only contains stable, tested code
- Tags are created for releases (v1.0.0, v1.1.0, etc.)
- Protected branch - requires PR for changes
-
develop: Integration branch for features- Contains the latest developed features
- All feature branches merge into develop
- Serves as the base for new feature branches
feature/feature-name: New features and improvements- Created from
develop - Merged back to
developvia Pull Request - Naming convention:
feature/description-of-feature - Automatically deleted after merge to develop
- Created from
release/version-number: Release preparation branches- Created manually from
developwhen ready for release - Used for final testing, documentation updates, version bumping
- Merged to
mainvia Pull Request for production release - Automatically deleted after merge to main
- Triggers NuGet package publishing to NuGet.org and GitHub Packages
- Naming convention:
release/v1.0.0,release/v1.1.0, etc.
- Created manually from
# Start from develop branch
git checkout develop
git pull origin develop
# Create feature branch
git checkout -b feature/your-feature-name- Make your changes on the feature branch
- Commit frequently with descriptive messages
- Test your changes thoroughly
# Push feature branch
git push -u origin feature/your-feature-name
# Create PR from feature/your-feature-name -> develop
# Include:
# - Clear description of changes
# - Testing performed
# - Any breaking changes- PR is reviewed and approved
- Merged into develop branch
- Feature branch is deleted
# When develop is ready for release
git checkout develop
git pull origin develop
# Create release branch
git checkout -b release/v1.0.0
# Update version numbers, documentation, changelog
# Perform final testing and validation
# Commit release preparation changes
git add .
git commit -m "chore: Prepare v1.0.0 release"
git push -u origin release/v1.0.0
# Create PR from release/v1.0.0 -> main
# Include:
# - Release notes
# - Testing performed
# - Version changelog- PR is reviewed and approved
- Merged into main branch
- CI/CD Pipeline automatically:
- Builds and tests the release
- Packs NuGet packages
- Publishes to NuGet.org and GitHub Packages
- Deletes the release branch
- Main branch is tagged with release version
main ← Production releases
├── develop ← Integration branch
├── feature/initial-library-structure ← Current feature work
└── feature/future-features
└── release/v1.0.0 ← Release preparation (temporary)
We use conventional commits for clarity:
feat:New featuresfix:Bug fixesdocs:Documentation changesstyle:Code formatting (no functional changes)refactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
feat: Add string extension methods for validation
fix: Resolve null reference exception in JsonHelper
docs: Update README with installation instructions
refactor: Optimize regex performance with GeneratedRegexAttributeOur GitHub Actions workflow automatically handles builds, tests, releases, and branch cleanup.
The CI/CD pipeline runs on:
Push Events:
mainbranch - Build, test, and validate production codedevelopbranch - Build, test, and validate integration coderelease/*branches - Build, test, and validate release preparation
Pull Request Events:
- PRs to
main- Build, test, and validate production changes - PRs to
develop- Build, test, and validate feature integration
- Runs on: All pushes to
main,develop,release/* - Runs on: All PRs to
main,develop - Actions: Restore dependencies, build solution, run tests with coverage
- Coverage: Uploads to Codecov for tracking
- Triggers: When feature branch is merged to
develop - Action: Automatically deletes the feature branch
- Purpose: Keeps repository clean after feature integration
- Triggers: When
release/*branch is merged tomain - Actions:
- Pack: Creates NuGet packages from release
- Publish: Publishes to NuGet.org and GitHub Packages
- Cleanup: Deletes the release branch
- Result: Production packages available for download
- Triggers: When
release/*branch is merged tomain - Action: Automatically deletes the release branch
- Purpose: Clean up after successful release
The workflow uses intelligent conditions to ensure jobs run only when appropriate:
- Feature deletion: Only when merged to
develop(notmain) - Release publishing: Only when
release/*merged tomain(not anymainpush) - Branch cleanup: Error handling prevents workflow failures
Feature Branch → PR to develop → Build/Test → Auto-delete feature branch
↓ (when ready for release)
Release Branch → PR to main → Build/Test → Pack/Publish → Auto-delete release branch
- Require pull request reviews
- Require status checks to pass (build, tests)
- Require up-to-date branches before merging
- Include administrators
- Require pull request reviews
- Require status checks to pass
- Include administrators
- Never commit directly to main
- Always create feature branches from develop
- Create release branches from develop (not from feature branches)
- Keep feature branches focused and small
- Write clear commit messages
- Update documentation with changes
- Test thoroughly before creating PRs
- Release branches trigger automatic NuGet publishing
- Branches are automatically deleted after successful merges
✅ Completed:
- Initial library structure implemented
- All projects created and configured
- Comprehensive tests and samples
- CI/CD pipeline set up with GitHub Packages support
- Interface reorganization completed (v0.1.0 preparation)
- All interfaces moved to PowerCSharp.Core
- Namespace structure:
PowerCSharp.Core.Interfaces.Extensions.* - Documentation updated to reflect new architecture
- Project references and using statements updated
- Enhanced CI/CD workflow implemented
- Automatic feature branch deletion after merge to develop
- Automatic release branch deletion after merge to main
- Smart triggers for pack/publish (only on release/* → main merges)
- Build/test coverage for main, develop, and release/* branches
- Comprehensive workflow documentation
� 📋 Ready for Use:
- Complete GitFlow workflow with automation
- Release process with automatic NuGet publishing
- Branch cleanup and repository maintenance
- Full CI/CD pipeline with proper triggers
� Next Steps:
- Create first release branch when ready for v0.1.0
- Test complete workflow with actual release
- Verify automatic NuGet publishing functionality
- Validate branch cleanup automation