Skip to content

Commit 079a7c0

Browse files
Implement unified release pipeline with consistent prerelease validation workflow across all streams (#191)
* Initial plan * Create reusable GitHub Actions workflows and update beta, alpha, and stable workflows to use them Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Add documentation for consolidated GitHub Actions workflow structure Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Further consolidate alpha and beta workflows by creating reusable components - Create reusable-update-dependencies.yml for Stage 1 dependency update logic - Create reusable-build-and-release-prerelease.yml for Stage 2 build and release logic - Update alpha and beta Stage 1 workflows to use reusable-update-dependencies.yml - Update alpha and beta Stage 2 workflows to use reusable-build-and-release-prerelease.yml - Update workflow documentation to reflect additional consolidation - Eliminate ~200 additional lines of duplicate YAML between alpha and beta streams Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Combine alpha and beta streams into consolidated prerelease workflows Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Further consolidate GitHub Actions workflows by extracting common patterns into reusable components Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Update reusable-build-package.yml to use optimized beta/alpha build process Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Consolidate stable workflow stages (1-5) into 2 unified workflows Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * refactor: use reusable-publish-npm workflow in stable release Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Consolidate cron schedule to single entry that processes both alpha and beta streams Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Enable homebridge-bot for stable releases and reduce workflow count by inlining single-use reusables Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Update homebridge-stable-bot.json * Merge single-use reusable workflows and remove dependabot configuration - Remove dependabot.yml since homebridge-beta-bot now manages stable releases - Merge reusable-update-dependencies.yml into release-stage-1_update_dependencies.yml - Merge both reusable-build-and-release.yml and reusable-build-package.yml into release-stage-2_build_and_release.yml - Remove 3 single-use reusable workflow files - Reduce total workflow count from 15 to 12 files (3 fewer) Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Implement unified release pipeline with consistent prerelease validation workflow Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> * Update release-stage-1_update_dependencies.yml * Consolidate reusable-publish workflows into main release pipeline Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com>
1 parent 4436f85 commit 079a7c0

18 files changed

+831
-1548
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/homebridge-stable-bot.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"auto_merge": true,
3+
"git_user": {
4+
"name": "Homebridge Stable Bot",
5+
"email": "actions@github.com"
6+
},
7+
"directories": [
8+
{
9+
"directory": "stable/32bit",
10+
"packages": [
11+
{
12+
"name": "homebridge-config-ui-x",
13+
"tag": "latest"
14+
},
15+
{
16+
"name": "homebridge",
17+
"tag": "latest"
18+
},
19+
{
20+
"name": "node",
21+
"tag": "^22.x.x"
22+
}
23+
]
24+
},
25+
{
26+
"directory": "stable/64bit",
27+
"packages": [
28+
{
29+
"name": "homebridge-config-ui-x",
30+
"tag": "latest"
31+
},
32+
{
33+
"name": "homebridge",
34+
"tag": "latest"
35+
},
36+
{
37+
"name": "node",
38+
"tag": "^24.x.x"
39+
}
40+
]
41+
}
42+
]
43+
}

.github/workflows/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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

.github/workflows/Stage-4_post_release_validation.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.

.github/workflows/alpha-stage-1_update_alpha_dependencies.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)