* Initial plan * Add release infrastructure: CHANGELOG, workflow, and documentation Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com> * Add release checklist and VERSION file Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com> * Fix variable assignment in release preparation script Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com> * Add release quick reference and update documentation Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com> * Add comprehensive release preparation summary Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com> * Add task completion summary --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>
6.9 KiB
Release Process Documentation
This document describes the release process for the MQL5 SMC + Trend Breakout Trading System.
Quick Release
For a standard release, use the automated release preparation script:
# Interactive menu
bash scripts/prepare_release.sh
# Or run full release preparation in one command
bash scripts/prepare_release.sh --full
The script will:
- Check prerequisites
- Validate repository structure
- Run all tests
- Package MT5 files
- Create and push a release tag
- Trigger the automated release workflow
Manual Release Process
If you prefer to do each step manually:
1. Prerequisites
Ensure you have the following installed:
- Git
- Python 3.x
- GitHub CLI (optional, for creating releases from CLI)
2. Update Version Information
Update the version in the following files:
mt5/MQL5/Experts/SMC_TrendBreakout_MTF_EA.mq5- Update#property versionCHANGELOG.md- Add a new version section with changes
3. Validate Repository
# Run repository validation
python3 scripts/ci_validate_repo.py
# Validate shell scripts
bash -n scripts/package_mt5.sh
bash -n scripts/deploy_mt5.sh
# Run automation tests
python3 scripts/test_automation.py
4. Commit Changes
git add .
git commit -m "Prepare release v1.21.0"
git push origin main
5. Create Release Tag
# Create annotated tag
git tag -a v1.21.0 -m "Release v1.21.0"
# Push tag to trigger release workflow
git push origin v1.21.0
6. Monitor Release Workflow
The GitHub Actions workflow will automatically:
- Validate the repository
- Build the MT5 package
- Create Docker images
- Create a GitHub release with assets
Monitor the workflow at: https://github.com/A6-9V/MQL5-Google-Onedrive/actions
Release Workflow
The release process is automated via GitHub Actions (.github/workflows/release.yml):
Triggered By
- Pushing a tag matching
v*.*.*(e.g.,v1.21.0) - Manual workflow dispatch with version input
Workflow Steps
- Validate - Runs repository validation and shell script checks
- Package - Creates
Exness_MT5_MQL5.zipwith all MT5 source files - Build Docker - Builds and pushes Docker images to GitHub Container Registry
- Create Release - Creates GitHub release with:
- Release notes extracted from CHANGELOG.md
- MT5 package (
.zip) - Package checksums (
.sha256) - Docker image reference
Release Assets
Each release includes:
- Exness_MT5_MQL5.zip - Complete MT5 source package
- Contains all
.mq5indicator files - Contains all
.mq5Expert Advisor files - Contains all
.mqhinclude files
- Contains all
- Exness_MT5_MQL5.zip.sha256 - SHA256 checksum for verification
- Docker Images - Available at
ghcr.io/a6-9v/mql5-google-onedrive:VERSION
Version Numbering
This project follows Semantic Versioning:
- MAJOR version (X.0.0) - Incompatible API changes
- MINOR version (0.X.0) - New functionality in a backwards compatible manner
- PATCH version (0.0.X) - Backwards compatible bug fixes
Version Format
- Git tags:
v1.21.0(with 'v' prefix) - MQL5 property:
"1.21"(without 'v', may use two digits) - Docker images:
1.21.0(without 'v')
Release Checklist
Before creating a release, ensure:
- All changes are committed and pushed
- Version updated in MQL5 EA file
- CHANGELOG.md updated with new version section
- All tests passing locally
- Documentation updated if needed
- No uncommitted or unstaged changes
- Working tree is clean
Testing a Release
Test MT5 Package
# Build package locally
bash scripts/package_mt5.sh
# Verify package contents
unzip -l dist/Exness_MT5_MQL5.zip
# Verify checksums
cd dist
sha256sum -c Exness_MT5_MQL5.zip.sha256
Test Docker Image
# Pull the release image
docker pull ghcr.io/a6-9v/mql5-google-onedrive:v1.21.0
# Run the container
docker run --rm ghcr.io/a6-9v/mql5-google-onedrive:v1.21.0 python3 -c "import sys; print(sys.version)"
Test Installation
-
Manual MT5 Installation:
# Download from GitHub releases wget https://github.com/A6-9V/MQL5-Google-Onedrive/releases/download/v1.21.0/Exness_MT5_MQL5.zip # Extract to MT5 data folder unzip Exness_MT5_MQL5.zip -d "/path/to/MT5/Data/Folder/" # Compile in MetaEditor # Open MT5 -> F4 (MetaEditor) -> Compile all files -
Automated Installation:
# Use deployment script bash scripts/deploy_mt5.sh "/path/to/MT5/Data/Folder"
Hotfix Releases
For urgent bug fixes:
-
Create a hotfix branch from the release tag:
git checkout -b hotfix/v1.21.1 v1.21.0 -
Make the fix and commit:
git commit -m "Fix critical bug in position management" -
Update version and changelog:
- Update version to
1.21.1 - Add hotfix section to CHANGELOG.md
- Update version to
-
Create hotfix tag:
git tag -a v1.21.1 -m "Hotfix v1.21.1" git push origin v1.21.1 -
Merge back to main:
git checkout main git merge hotfix/v1.21.1 git push origin main
Pre-releases
To create a pre-release (beta, RC, etc.):
-
Use pre-release version format:
git tag -a v1.22.0-beta.1 -m "Release v1.22.0-beta.1" git push origin v1.22.0-beta.1 -
Or use workflow dispatch with "pre-release" option checked
Pre-releases are marked accordingly on GitHub and are not shown as "Latest" release.
Rollback
To rollback to a previous release:
-
Find the previous release tag:
git tag -l -
Checkout the tag:
git checkout v1.20.0 -
For production environments, download the specific release package:
wget https://github.com/A6-9V/MQL5-Google-Onedrive/releases/download/v1.20.0/Exness_MT5_MQL5.zip
Release Announcement
After a successful release:
- Update README.md if needed
- Announce in relevant channels:
- GitHub Discussions
- Project documentation
- WhatsApp community
- Update any external documentation or websites
Troubleshooting
Tag Already Exists
If you need to recreate a tag:
# Delete local tag
git tag -d v1.21.0
# Delete remote tag
git push origin :refs/tags/v1.21.0
# Recreate and push
git tag -a v1.21.0 -m "Release v1.21.0"
git push origin v1.21.0
Workflow Failed
If the release workflow fails:
- Check the Actions tab for error logs
- Fix the issue locally
- Delete the failed release (if created)
- Delete and recreate the tag
- Push the tag again
Package Build Failed
If packaging fails:
# Check for missing files
python3 scripts/ci_validate_repo.py
# Verify all MT5 files exist
ls -R mt5/MQL5/
# Try building manually
bash scripts/package_mt5.sh
Support
For issues with the release process:
- Open an issue: https://github.com/A6-9V/MQL5-Google-Onedrive/issues
- Check documentation:
docs/INDEX.md - Review workflow logs: GitHub Actions tab