|
| 1 | +# Consolidated GitHub Actions Workflows |
| 2 | + |
| 3 | +This directory contains the GitHub Actions workflows for the Homebridge APT package repository. As of the consolidation effort (Issue #190), the workflows have been reorganized to reduce duplication and improve maintainability. |
| 4 | + |
| 5 | +## Workflow Directory Structure |
| 6 | + |
| 7 | +This directory contains GitHub Actions workflows organized by functionality: |
| 8 | + |
| 9 | +### Core Release Workflows (2 files) |
| 10 | +- `release-stage-1_update_dependencies.yml` - Bot-managed dependency updates for all release types (stable, beta, alpha) |
| 11 | +- `release-stage-2_build_and_release.yml` - Unified build, validation and publishing pipeline for all releases |
| 12 | + |
| 13 | +### Reusable Workflows (1 file) |
| 14 | +- `reusable-validate-homebridge.yml` - Package installation validation (used 2+ times) |
| 15 | + |
| 16 | +### Utility Workflows (7 files) |
| 17 | +- `beta-backup_and_clean.yml` - Beta repository cleanup |
| 18 | +- `pr-labeler.yml` - PR labeling automation |
| 19 | +- `purge.yml` - CloudFlare cache purging |
| 20 | +- `release_trigger_logger.yml` - Release event logging |
| 21 | +- `stage-3_5_purge_cloudflare_cache.yml` - Post-release cache purging |
| 22 | +- `stale.yml` - Stale issue management |
| 23 | +- `README.md` - This documentation |
| 24 | + |
| 25 | +## Release Pipeline Architecture |
| 26 | + |
| 27 | +### Unified Process (All Release Types) |
| 28 | +All release streams (stable, beta, alpha) follow the same 8-step pipeline: |
| 29 | + |
| 30 | +1. **Bot Updates Dependencies** - `homebridge-beta-bot` updates package.json files daily |
| 31 | +2. **Build Packages** - Cross-platform package builds for all architectures |
| 32 | +3. **Create GitHub Prerelease** - Upload artifacts and create prerelease |
| 33 | +4. **Validate Prerelease** - Download and test .deb packages from GitHub |
| 34 | +5. **Promote to Release** - Convert prerelease to full release after validation |
| 35 | +6. **Publish to APT** - Upload packages to repository |
| 36 | +7. **Validate APT Installation** - Test installation from repository |
| 37 | +8. **Publish to NPM** - Publish package with appropriate tags |
| 38 | + |
| 39 | +### Configuration Files |
| 40 | +- `.github/homebridge-stable-bot.json` - Bot configuration for stable releases |
| 41 | +- `.github/homebridge-beta-bot.json` - Bot configuration for beta/alpha releases |
| 42 | + |
| 43 | +### Workflow Triggers |
| 44 | +- **Scheduled**: Daily at 8 AM UTC for dependency updates |
| 45 | +- **Push**: Triggered by bot commits to package.json files |
| 46 | +- **Manual**: workflow_dispatch for testing and manual releases |
| 47 | + |
| 48 | +## Development and Maintenance |
| 49 | + |
| 50 | +### Modifying Release Logic |
| 51 | +Since all release types use unified workflows, changes only need to be made in 2 places: |
| 52 | +1. **Dependency Updates**: Edit `release-stage-1_update_dependencies.yml` |
| 53 | +2. **Build/Release Pipeline**: Edit `release-stage-2_build_and_release.yml` |
| 54 | + |
| 55 | +### Adding Validation Steps |
| 56 | +Edit the validation logic in `reusable-validate-homebridge.yml` which is used by both prerelease and APT validation steps. |
| 57 | + |
| 58 | +### Managing Bot Configuration |
| 59 | +- **Stable releases**: Update `.github/homebridge-stable-bot.json` |
| 60 | +- **Beta/Alpha releases**: Update `.github/homebridge-beta-bot.json` |
| 61 | + |
| 62 | +## Benefits of Consolidation |
| 63 | + |
| 64 | +1. **Maximum Workflow Reduction**: 25 → 10 workflows (60% reduction) |
| 65 | +2. **Unified Release Management**: All release streams use identical infrastructure |
| 66 | +3. **Enhanced Quality Assurance**: Double validation (GitHub + APT) for every release |
| 67 | +4. **Simplified Operations**: Single workflow to maintain instead of separate logic |
| 68 | +5. **Automated Process**: Eliminates manual promotion steps with automatic validation gates |
| 69 | +6. **Future-Proof Architecture**: Easy to add validation steps or extend to new release streams |
0 commit comments