|
1 | | - For Automated Releases: |
| 1 | +# Releasing HudClock |
2 | 2 |
|
3 | | - 1. Push your code to GitHub |
4 | | - 2. Create a tag: git tag v1.0.0 && git push origin v1.0.0 |
5 | | - 3. GitHub Actions will automatically create a release with all packages |
| 3 | +## Version Management |
6 | 4 |
|
7 | | - For Local Testing: |
| 5 | +HudClock uses a centralized version management system: |
| 6 | +- Version is stored in `/VERSION` file (e.g., `1.0.0`) |
| 7 | +- `Directory.Build.props` reads this version for all projects |
| 8 | +- No need to update version in multiple places |
8 | 9 |
|
9 | | - # Quick self-contained build |
10 | | - dotnet publish src/wpf/MetricClock.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true |
| 10 | +### Current Version |
| 11 | +Check the current version: |
| 12 | +```bash |
| 13 | +cat VERSION |
| 14 | +``` |
11 | 15 |
|
12 | | - # Or use the installer script |
13 | | - .\build\create-installer.ps1 -Version 1.0.0 |
14 | | - |
| 16 | +## Creating a Release |
| 17 | + |
| 18 | +### Option 1: Automated Release (Recommended) |
| 19 | + |
| 20 | +Use the version bump script: |
| 21 | +```powershell |
| 22 | +# Bump patch version (1.0.0 -> 1.0.1) |
| 23 | +.\build\bump-version.ps1 -BumpType patch -CreateTag -Push |
| 24 | +
|
| 25 | +# Bump minor version (1.0.0 -> 1.1.0) |
| 26 | +.\build\bump-version.ps1 -BumpType minor -CreateTag -Push |
| 27 | +
|
| 28 | +# Bump major version (1.0.0 -> 2.0.0) |
| 29 | +.\build\bump-version.ps1 -BumpType major -CreateTag -Push |
| 30 | +``` |
| 31 | + |
| 32 | +This will: |
| 33 | +1. Update the VERSION file |
| 34 | +2. Test build with new version |
| 35 | +3. Commit the change |
| 36 | +4. Create an annotated tag (e.g., `v1.0.1`) |
| 37 | +5. Push everything to GitHub |
| 38 | +6. Trigger GitHub Actions to create the release |
| 39 | + |
| 40 | +### Option 2: Manual Release |
| 41 | + |
| 42 | +1. **Update version**: |
| 43 | + ```bash |
| 44 | + echo "1.0.1" > VERSION |
| 45 | + ``` |
| 46 | + |
| 47 | +2. **Commit version change**: |
| 48 | + ```bash |
| 49 | + git add VERSION |
| 50 | + git commit -m "Bump version to 1.0.1" |
| 51 | + ``` |
| 52 | + |
| 53 | +3. **Create and push tag**: |
| 54 | + ```bash |
| 55 | + git tag -a v1.0.1 -m "Release v1.0.1" |
| 56 | + git push |
| 57 | + git push origin v1.0.1 |
| 58 | + ``` |
| 59 | + |
| 60 | +## GitHub Actions Workflow |
| 61 | + |
| 62 | +When you push a tag starting with `v`, the workflow will: |
| 63 | +1. Build the application |
| 64 | +2. Create multiple package types: |
| 65 | + - Self-contained single EXE (~150MB, no .NET required) |
| 66 | + - Framework-dependent single EXE (~1MB, requires .NET 8) |
| 67 | + - Portable ZIP with multiple files |
| 68 | +3. Create a GitHub Release |
| 69 | +4. Upload all packages as release assets |
| 70 | + |
| 71 | +## Local Testing |
| 72 | + |
| 73 | +### Build single-file executable: |
| 74 | +```powershell |
| 75 | +# Self-contained (no .NET required) |
| 76 | +dotnet publish src/wpf/MetricClock.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true |
| 77 | +
|
| 78 | +# Framework-dependent (requires .NET 8) |
| 79 | +dotnet publish src/wpf/MetricClock.csproj -c Release -r win-x64 --no-self-contained -p:PublishSingleFile=true |
| 80 | +``` |
| 81 | + |
| 82 | +### Create installer: |
| 83 | +```powershell |
| 84 | +.\build\create-installer.ps1 -Version $(Get-Content VERSION) |
| 85 | +``` |
| 86 | + |
| 87 | +## Release Checklist |
| 88 | + |
| 89 | +Before releasing: |
| 90 | +- [ ] All changes committed and pushed |
| 91 | +- [ ] Application builds without errors |
| 92 | +- [ ] Tested on Windows 10/11 |
| 93 | +- [ ] Updated documentation if needed |
| 94 | +- [ ] Decided on version bump type (major/minor/patch) |
| 95 | + |
| 96 | +## Version Numbering |
| 97 | + |
| 98 | +HudClock follows [Semantic Versioning](https://semver.org/): |
| 99 | +- **Major** (X.0.0): Breaking changes |
| 100 | +- **Minor** (1.X.0): New features, backward compatible |
| 101 | +- **Patch** (1.0.X): Bug fixes, backward compatible |
| 102 | + |
| 103 | +## Monitoring Releases |
| 104 | + |
| 105 | +- **GitHub Actions**: https://github.com/lionfire/hudclock/actions |
| 106 | +- **Releases Page**: https://github.com/lionfire/hudclock/releases |
| 107 | +- **Latest Release**: https://github.com/lionfire/hudclock/releases/latest |
| 108 | + |
| 109 | +## Troubleshooting |
| 110 | + |
| 111 | +If a release fails: |
| 112 | +1. Check GitHub Actions logs |
| 113 | +2. Ensure version format is correct (X.Y.Z) |
| 114 | +3. Verify tag starts with 'v' (e.g., v1.0.0) |
| 115 | +4. Check file permissions and .NET SDK version |
0 commit comments