@@ -27,10 +27,12 @@ Before the release workflow can publish stable versions from GitHub Actions:
27273 . In ` solidos/solidos ` → Settings → Secrets and variables → Actions, add:
2828 - ` GIT_PUSH_TOKEN `
2929 - ` NPM_TOKEN `
30- 4 . Confirm target repos allow the token/account to push to ` main ` , or decide to use a PR-based merge flow instead.
31- 5 . Run the ` Solidos Release ` workflow manually with:
30+ 4 . For ** protected branches on main** : Use ` mode=stable-publish ` (no extra config needed—it auto-merges PRs)
31+ 5 . For ** unprotected main branch** : Use ` mode=stable ` (requires direct push access)
32+ 6 . Run the ` Solidos Release ` workflow manually with:
3233 - ` mode=test ` for prerelease publishing
33- - ` mode=stable ` for ` @latest `
34+ - ` mode=stable-publish ` for ` @latest ` (protected branch)
35+ - ` mode=stable ` for ` @latest ` (direct push)
3436
3537## How It Works
3638
@@ -40,40 +42,31 @@ Before the release workflow can publish stable versions from GitHub Actions:
4042| ----------| ---------| -------| -----------|
4143| ** Local Testing** | ` node scripts/release-orchestrator.js --dry-run=true ` | Your computer | ❌ No (prints what would happen) |
4244| ** Test Release** | Manual trigger: mode=test | GitHub Actions | ✅ Yes (@test tag) |
43- | ** Stable Release** | Manual trigger: mode=stable | GitHub Actions | ✅ Yes (@latest tag) |
45+ | ** Stable Release (Direct Push)** | Manual trigger: mode=stable | GitHub Actions | ✅ Yes (@latest tag) |
46+ | ** Stable Release (Protected Branch)** | Manual trigger: mode=stable-publish | GitHub Actions | ✅ Yes (@latest tag, auto-merges PR) |
4447
45- ** Workflow:**
48+ ** Workflow (stable-publish mode with protected branches) :**
4649```
47- You click "Run workflow" button in GitHub Actions (mode=test or mode=stable)
48- ↓
49- release.yml starts
50- ↓
51- Runs: node scripts/release-orchestrator.js --mode <test|stable> ...
52- ↓
53- Script reads release.config.json (list of repos to release)
54- ↓
50+ You click "Run workflow" → mode=stable-publish
51+ ↓ Step 1/3: Create Release PR
52+ Creates release branch from dev → Merges dev into main → Pushes branch → Opens PR
53+ ↓ Step 2/3: Auto-Merge PR
54+ Waits for CI checks to pass → Auto-merges PR with --squash → Fetches updated main
55+ ↓ Step 3/3: Publish
5556For each repo listed:
56- - Clone if missing (optional)
57- - Checkout branch (dev for test, main for stable)
5857 - npm install
59- - afterInstall with @test or @latest tags (with fallback)
60-
61- [Stable mode only: Check skip logic]
62- - Compare origin/dev vs main
63- - If dev has new commits → merge origin/dev into main with [skip ci]
64- - If no changes and --branch not specified → skip this repo
65-
66- [Test mode: always continues]
67-
68- - npm test
69- - npm run build
70- - npm version (bump patch/minor/major/prerelease)
71- - npm publish (to npm registry with @test or @latest tag)
72- - git push + tags (stable only)
73- ↓
74- Generates release-summary.json
58+ - npm version (bump patch/minor/major)
59+ - npm publish (@latest tag)
60+ - git push + tags all at once
7561```
7662
63+ ** Old two-step flow (still supported for manual workflows):**
64+ - Step 1: ` mode=stable-prepare-pr ` - creates PR, human reviews/merges
65+ - Step 2: ` mode=stable-publish ` - requires manual merge first
66+
67+ ** New unified flow (recommended):**
68+ - Single ` mode=stable-publish ` - does all three: create PR, auto-merge, publish
69+
7770## Key Points
7871
7972- ** Individual repos need nothing special** — they just need ` package.json ` and npm scripts
@@ -115,15 +108,30 @@ node scripts/release-orchestrator.js --mode test --dry-run=true
115108- ** Always publishes** (no skip logic)
116109- ** Use case:** Pre-release versions for testing from dev branch
117110
118- ** Scenario 3: GitHub Stable Release**
111+ ** Scenario 3: GitHub Stable Release (Protected Branches)**
112+ - Click Actions → "Solidos Release" → Run workflow
113+ - Inputs: mode=stable-publish, dry_run=false
114+ - ** Single command that does everything:**
115+ 1 . Creates release branch from dev
116+ 2 . Opens PR to main
117+ 3 . Waits for CI checks to pass
118+ 4 . Auto-merges PR (squash merge)
119+ 5 . Publishes all packages to npm with ` @latest ` tag
120+ 6 . Pushes git tags to main
121+ - Eliminates manual PR merge step
122+ - ** Perfect for:** Organizations with branch protection rules on ` main `
123+ - ** Use case:** Automated stable releases without human intervention on PR merge
124+
125+ ** Scenario 4: GitHub Stable Release (Direct Push)**
119126- Click Actions → "Solidos Release" → Run workflow
120127- Inputs: mode=stable, dry_run=false
121128- Automatically merges origin/dev → main if dev has new commits
122129- Publishes to npm with ` @latest ` tag
123130- Creates git tags and pushes to GitHub
124131- Results in GitHub Actions logs and artifacts
125132- Skips if dev has no new commits (unless --branch=main specified)
126- - ** Use case:** Production releases to @latest
133+ - ** WARNING:** Requires write access to protected branches, may fail with 403
134+ - ** Use case:** Repositories without branch protection on ` main `
127135
128136Local dry-run
129137- Show the exact commands without running them:
0 commit comments