Per-Service Release System
yarn deploy:prepare
The new way to deploy @ Hero
Before vs After
Global Tags → Per-Service Tags
| Before | After |
|---|---|
git tag v1.2.3 abc123 |
git tag api@1.2.3 abc123 |
| All services at same commit | Independent commits per service |
| One broken service blocks all | Granular service selection |
# New format
api@1.2.3 # at commit abc123
app@2.0.1 # at commit def456
admin@1.0.5 # at commit ghi789
How It Works
Interactive 6-Step Flow
- Detect - Find services with changes since their last tag
- CI Status - Fetch GitHub Actions status per service
- Select Commit - Choose which commit (auto-selects first "clean" one)
- Select Services - Pick which services to release
- Validate - Check BREAK-BY and FIXUP constraints
- Deploy - Create and push tags
CI Status Integration
Smart Commit Selection
CI Status Legend:
✓ = passed ● = E2E failed ✗ = failed ◐ = pending
Select a commit to deploy:
def5678 ✓api ◐app - fix(app): resolve bug
> abc1234 ✓api ✓app ●admin - feat(api): add endpoint
ghi9012 ✗api - chore: update deps
Clean Scope: A commit is "clean" if ALL services in scope have green (✓) or orange (●) CI status.
Progressive Release
Handling BREAK-BY Commits
Problem: Some commits can't be deployed together
Commit C: [BREAK-BY:A] fix(api): cleanup (needs A deployed first)
Commit A: feat(api): new DB migration
Solution: Two-step release flow
? Found 1 unresolved BREAK-BY constraint(s)
1. Release safe scope (excluding BREAK-BY commits)
2. Run deploy:prepare again after Release 1 completes
? Proceed with progressive release? (Y/n)
BREAK-BY vs FIXUP Validators
Two Opposite Constraints
| BREAK-BY | FIXUP |
|---|---|
[BREAK-BY:hash] |
[FIXUP:hash] |
| Cannot deploy together | Must deploy together |
| Target released FIRST | FIXUP goes WITH target |
BREAK-BY Violation:
Commit abc1234 cannot be deployed with commit xyz789.
The target must be released FIRST in a separate deployment.
FIXUP Violation:
Commit abc1234 must be included with target def5678.
The FIXUP commit must be deployed together with its target.
Changelog & Key Files
Auto-Generated Changelog
⚙️ api@1.46.0 🟢
✨ (john.doe) abc1234 - feat(api): add payment endpoint
🔧 (jane.doe) def5678 - fix(api): resolve timeout
🖥 app@2.13.0 🟠 SOAK
✨ [SOAK] (alice.wong) jkl3456 - feat(app): new widget
Getting Started
Commands
yarn deploy:prepare # Interactive flow
yarn deploy:prepare --dry-run # Preview mode
Navigation
- ↑/↓ Navigate | Space Toggle | Enter Confirm
- Backspace Go back | R Reload
Requirements
- GitHub CLI:
brew install gh - Auth:
gh auth login
deck
By Remy Choffardet
deck
- 10