5.4 KiB
Contributing to MaksIT.UScheduler
Thank you for your interest in contributing to MaksIT.UScheduler!
Table of Contents
Development Setup
-
Clone the repository:
git clone https://github.com/MaksIT/uscheduler.git cd uscheduler -
Open the solution in Visual Studio or your preferred IDE:
src/MaksIT.UScheduler/MaksIT.UScheduler.sln -
Build the project:
dotnet build src/MaksIT.UScheduler/MaksIT.UScheduler.csproj
Branch Strategy
main- Production-ready codedev- Active development branch- Feature branches - Created from
devfor specific features
Making Changes
- Create a feature branch from
dev - Make your changes
- Update
CHANGELOG.mdwith your changes - Update version in
.csprojif needed - Test your changes locally using dev tags
- Submit a pull request to
dev
Versioning
This project follows Semantic Versioning:
- MAJOR - Incompatible API changes
- MINOR - New functionality (backwards compatible)
- PATCH - Bug fixes (backwards compatible)
Version format: X.Y.Z (e.g., 1.0.1)
Release Process
Prerequisites
- .NET SDK installed
- Git CLI
- GitHub CLI (
gh) - required only for production releases - GitHub token set in environment variable (configured in
scriptsettings.json)
Version Files
Before creating a release, ensure version consistency across:
-
.csproj- Update<Version>element:<Version>1.0.1</Version> -
CHANGELOG.md- Add version entry at the top:## v1.0.1 ### Added - New feature description ### Fixed - Bug fix description
Branch-Based Release Behavior
The release script behavior is controlled by the current branch (configurable in scriptsettings.json):
| Branch | Tag Required | Uncommitted Changes | Behavior |
|---|---|---|---|
Dev (dev) |
No | Allowed | Local build only (version from .csproj) |
Release (main) |
Yes | Not allowed | Full release to GitHub |
| Other | - | - | Blocked |
Branch names can be customized in scriptsettings.json:
"branches": {
"release": "main",
"dev": "dev"
}
Development Build Workflow
Test builds on the dev branch - no tag needed:
# 1. On dev branch: Update version in .csproj and CHANGELOG.md
git checkout dev
# 2. Commit your changes
git add .
git commit -m "Prepare v1.0.1 release"
# 3. Run the release script (no tag needed!)
cd src/scripts/Release-ToGitHub
.\Release-ToGitHub.ps1
# Output: DEV BUILD COMPLETE
# Creates: release/maksit.uscheduler-1.0.1.zip (local only)
Production Release Workflow
When ready to publish, merge to main, create tag, and run:
# 1. Merge to main
git checkout main
git merge dev
# 2. Create tag (required on main)
git tag v1.0.1
# 3. Run the release script
cd src/scripts/Release-ToGitHub
.\Release-ToGitHub.ps1
# Output: RELEASE COMPLETE
# Creates: release/maksit.uscheduler-1.0.1.zip
# Pushes tag to GitHub
# Creates GitHub release with assets
Release Script Details
The Release-ToGitHub.ps1 script performs these steps:
Pre-flight checks:
- Detects current branch (
mainordev) - On
main: requires clean working directory; ondev: uncommitted changes allowed - Reads version from
.csproj(source of truth) - On
main: requires tag matching the version - Ensures
CHANGELOG.mdhas matching version entry - Checks GitHub CLI authentication (main branch only)
Build process:
- Publishes .NET project in Release configuration
- Copies
Scriptsfolder into the release - Creates versioned ZIP archive
- Extracts release notes from
CHANGELOG.md
GitHub release (main branch only):
- Pushes tag to remote if not present
- Creates (or recreates) GitHub release with assets
Configuration:
The script reads settings from scriptsettings.json:
{
"github": {
"tokenEnvVar": "GITHUB_MAKS_IT_COM"
},
"paths": {
"csprojPath": "..\\..\\MaksIT.UScheduler\\MaksIT.UScheduler.csproj",
"changelogPath": "..\\..\\..\\CHANGELOG.md",
"releaseDir": "..\\..\\release"
},
"release": {
"zipNamePattern": "maksit.uscheduler-{version}.zip",
"releaseTitlePattern": "Release {version}"
}
}
Changelog Guidelines
Follow Keep a Changelog format:
## v1.0.1
### Added
- New features
### Changed
- Changes to existing functionality
### Deprecated
- Features to be removed in future
### Removed
- Removed features
### Fixed
- Bug fixes
### Security
- Security-related changes