5.6 KiB
5.6 KiB
🤖 Automation Guide: GitHub Workflows + MMRL Integration
This guide explains the complete automated system for releasing KernelSU modules and maintaining an MMRL repository.
🏗️ System Overview
The repository now includes a fully automated CI/CD pipeline that:
- Automatically creates releases when you push a git tag
- Builds module ZIP files with proper versioning
- Updates the MMRL repository with new module information
- Deploys to GitHub Pages for fast MMRL access
- Provides users with automatic updates via the MMRL app
🚀 How to Create a Release
Method 1: Using the PowerShell Script (Recommended)
# Create a new release
./create-release.ps1 -Version "v1.1.0"
# Force release even with uncommitted changes
./create-release.ps1 -Version "v1.1.0" -Force
Method 2: Manual Git Tags
# Update module.prop manually if needed
# Then create and push a tag
git tag v1.1.0
git push origin v1.1.0
Method 3: GitHub Web Interface
- Go to your repository on GitHub
- Click Releases → Create a new release
- Choose Create new tag and enter version (e.g.,
v1.1.0) - Fill in release details and click Publish release
🔄 What Happens Automatically
When You Create a Release:
-
Release Workflow Triggers (
.github/workflows/release.yml)- Updates
module.propwith the new version - Creates a ZIP file from the module directory
- Generates a changelog from git commits
- Creates a GitHub release with the ZIP attached
- Triggers the MMRL update workflow
- Updates
-
MMRL Update Workflow Triggers (
.github/workflows/update-mmrl.yml)- Fetches the latest release information
- Updates
mmrl-repo/repo.jsonwith new timestamp - Updates
mmrl-repo/modules.jsonwith new version info - Validates JSON files for MMRL compatibility
- Commits and pushes the updated MMRL repository
-
GitHub Pages Deployment
- The MMRL repository files are automatically deployed
- Users can access the repository via the GitHub Pages URL
📱 MMRL Repository Details
Repository URL for MMRL App:
https://raw.githubusercontent.com/overspend1/overmodules/master/mmrl-repo/repo.json
What Users See:
- Repository Name: "Terragon Labs KernelSU Modules"
- Available Modules: KernelSU Anti-Bootloop & Backup
- Automatic Updates: When you release new versions
- Direct Download: Links to GitHub releases
🛠️ Workflow Configuration
Release Workflow Features:
- ✅ Automatic version detection from git tags
- ✅ Module ZIP building with proper naming
- ✅ Changelog generation from git commits
- ✅ Multiple file attachment to releases
- ✅ Manual trigger support via GitHub Actions UI
MMRL Update Workflow Features:
- ✅ Triggered by releases, manual dispatch, or daily schedule
- ✅ Automatic version and download URL detection
- ✅ JSON validation to prevent MMRL compatibility issues
- ✅ Fallback to current version if no releases exist
- ✅ Proper timestamp management for MMRL sync
🔧 Customization Options
Adding New Modules:
- Create a new module directory (e.g.,
my_new_module/) - Update
.github/workflows/release.ymlto include the new module - Update
.github/workflows/update-mmrl.ymlto add the module tomodules.json - Test with a new release
Changing Repository Information:
- Update
mmrl-repo/repo.jsonfor repository metadata - Update workflow files to change URLs and paths
- Update
README.mdwith new information
Modifying Release Process:
- Edit
.github/workflows/release.ymlfor release customization - Edit
create-release.ps1for script improvements - Test changes with a new release
🐛 Troubleshooting
Common Issues:
-
Workflow Fails:
- Check GitHub Actions logs
- Verify JSON syntax in MMRL files
- Ensure proper file permissions
-
MMRL Not Updating:
- Verify the repository URL in MMRL app
- Check if GitHub Pages is enabled
- Wait for workflow completion (can take 2-5 minutes)
-
Release Creation Fails:
- Ensure you have push permissions
- Check if the tag already exists
- Verify
module.propfile exists and is valid
Debug Commands:
# Check workflow status
gh run list
# View specific workflow run
gh run view <run-id>
# Check repository status
git status
git log --oneline -5
# Validate JSON files
python -m json.tool mmrl-repo/repo.json
python -m json.tool mmrl-repo/modules.json
📊 Monitoring
GitHub Actions:
- URL: https://github.com/overspend1/overmodules/actions
- Monitor: Release and MMRL update workflows
- Logs: Available for 90 days
MMRL Repository:
- Live URL: https://raw.githubusercontent.com/overspend1/overmodules/master/mmrl-repo/repo.json
- Validation: JSON files are automatically validated
- Updates: Happen within 2-5 minutes of release creation
🎯 Best Practices
- Always test modules before creating releases
- Use semantic versioning (v1.0.0, v1.1.0, v2.0.0)
- Write descriptive commit messages for better changelogs
- Monitor GitHub Actions after creating releases
- Keep module.prop updated with accurate information
- Test MMRL integration after major changes
🔮 Future Enhancements
- Multi-module support in a single repository
- Automated testing before releases
- Discord/Telegram notifications for new releases
- Download statistics tracking
- Beta/Alpha release channels
The automation is now complete! 🎉
Users can add your MMRL repository and get automatic updates whenever you create new releases.