This guide explains how to create automated releases of Wareflow EMS with Windows executables.
Creating a release is now automated and takes just 30 seconds:
# 1. Make sure your changes are committed and pushed
git add .
git commit -m "feat: add new feature"
git push origin main
# 2. Create and push a version tag
git tag v1.0.0
git push --tags
# That's it! GitHub Actions will:
# - Run tests
# - Build Windows .exe
# - Create GitHub release
# - Upload executableWareflow EMS uses Semantic Versioning:
- Major version (X.0.0): Breaking changes
- Minor version (0.X.0): New features, backward compatible
- Patch version (0.0.X): Bug fixes, backward compatible
Examples:
v1.0.0- First stable releasev1.1.0- Added new featurev1.1.1- Bug fixv2.0.0- Breaking changes
When you push a version tag (e.g., v1.0.0), GitHub Actions automatically:
-
Runs Tests
- Executes pytest test suite
- Ensures code quality
- Blocks release if tests fail
-
Builds Windows Executable
- Uses PyInstaller with
wareflow-ems.spec - Creates single .exe file (~100 MB)
- Includes all dependencies
- Bundles application icon
- Uses PyInstaller with
-
Creates GitHub Release
- Generates release notes
- Attaches .exe file
- Includes SHA256 checksum
- Marks as latest release
-
Uploads Artifacts
- Stores .exe for 90 days
- Provides download link
- Shows file size and checksum
Before creating an official release, you can test the build locally:
# Install build dependencies
uv sync --extra build# Using the build script (recommended)
python scripts/build.py
# Or using PyInstaller directly
pyinstaller wareflow-ems.spec --clean --noconfirmThe executable will be created at: dist/Wareflow EMS.exe
# Run the built executable
./dist/Wareflow\ EMS.exe
# Or from Windows Explorer
# Navigate to dist/ folder and double-click Wareflow EMS.exeBefore creating a release, ensure:
- All changes are committed to
mainbranch - Tests pass locally:
uv run pytest tests/ - Version number updated in
pyproject.toml - CHANGELOG.md updated with changes
- Tested local build successfully
- No critical bugs outstanding
Edit pyproject.toml:
[project]
version = "1.0.0" # Update thisEdit CHANGELOG.md:
## [1.0.0] - 2025-01-26
### Added
- New feature A
- New feature B
### Fixed
- Bug fix C
- Bug fix D
### Changed
- Improvement Egit add pyproject.toml CHANGELOG.md
git commit -m "chore: release v1.0.0"
git push origin maingit tag v1.0.0
git push --tagsGo to: https://github.com/wareflowx/wareflow-ems/actions
Wait for the "Release" workflow to complete (typically 5-10 minutes).
Go to: https://github.com/wareflowx/wareflow-ems/releases
Verify:
- Release created with correct version
- .exe file attached
- File size is reasonable (~100 MB)
- Release notes are correct
- SHA256 checksum provided
Download the .exe and test on a clean Windows system:
# Install and run
# Verify no errors
# Check all features work
# Confirm database creationProblem: PyInstaller build fails
Solutions:
# Clean build artifacts
rm -rf build/ dist/
# Try building with verbose output
pyinstaller wareflow-ems.spec --clean --noconfirm --log-level DEBUG
# Check for missing imports
# Add to hiddenimports in wareflow-ems.spec if neededProblem: .exe is too large (> 200 MB)
Solutions:
- Check
upx=Trueis enabled in spec - Exclude unnecessary modules
- Use
--exclude-modulefor unused packages - Optimize imports
Problem: .exe crashes on startup
Solutions:
# Test with console to see errors
# Change console=True in wareflow-ems.spec temporarily
# Check hiddenimports in spec
# Add missing modulesProblem: Build times out on GitHub
Solutions:
- Check .yml timeout setting
- Optimize test suite speed
- Reduce dependencies
- Check GitHub Actions status page
## Wareflow EMS {VERSION}
### 🎉 Highlights
- Main feature or improvement
### ✨ New Features
- Feature A
- Feature B
### 🐛 Bug Fixes
- Fix C
- Fix D
### 🔧 Improvements
- Improvement E
- Improvement F
### 📝 Documentation
- Doc update G
### 🚀 Performance
- Performance improvement H
### 📦 Installation
Windows: Download `Wareflow-EMS-{VERSION}.exe` below
- No Python installation required
- All dependencies bundled
- SHA256 checksum provided
### 🖥️ System Requirements
- Windows 10 or later
- 100 MB free disk space
- No additional dependencies
---
**Full Changelog**: https://github.com/wareflowx/wareflow-ems/compare/v{PREVIOUS}...v{VERSION}
For automatic changelog from commits:
# Install git-changelog
pip install git-changelog
# Generate changelog
git-changelog > CHANGELOG.mdCommit messages should follow conventions:
feat:- New featuresfix:- Bug fixesdocs:- Documentationchore:- Maintenance tasksperf:- Performance improvements
The current build does not include code signing. This means:
- Windows may show SmartScreen warning
- Users must click "Run anyway"
To enable code signing (optional):
- Purchase code signing certificate (~$100-500/year)
- Add certificate to GitHub Secrets
- Update
.github/workflows/release.ymlto sign .exe
Users can verify the downloaded .exe:
Windows PowerShell:
certutil -hashfile Wareflow-EMS-1.0.0.exe SHA256Linux/Mac:
shasum -a 256 Wareflow-EMS-1.0.0.exeCompare the output with the provided .exe.sha256 file.
If a critical issue is discovered:
- Delete the release (from GitHub releases page)
- Delete the tag:
git tag -d v1.0.0 git push --delete origin v1.0.0
- Fix the issue and create new tag (e.g.,
v1.0.1) - Document the rollback in CHANGELOG
- Test thoroughly before releasing
- Use semantic versioning consistently
- Update CHANGELOG with every release
- Monitor GitHub Actions for build failures
- Test download on clean Windows system
- Keep releases backward compatible when possible
- Document breaking changes clearly
- Tag releases in git for easy rollback
For pre-release testing:
git tag v1.1.0-beta.1
git push --tagsThe workflow will still create a release, but users will know it's a beta.
For critical bug fixes:
# Create hotfix branch from tag
git checkout -b hotfix/v1.0.1 v1.0.0
# Make fix
git commit -m "fix: critical bug"
# Create hotfix tag
git tag v1.0.1
git push --tagsFor continuous releases from main branch:
- Remove
tagstrigger from.github/workflows/release.yml - Add
push: branches: [main]trigger - Auto-increment version on each push
- GitHub Actions Documentation
- PyInstaller Documentation
- Semantic Versioning
- Release Drifter GitHub Action
If you encounter issues:
- Check GitHub Actions logs
- Review this guide's troubleshooting section
- Search existing GitHub issues
- Create new issue with details
Happy releasing! 🚀