You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Important**: The `needs` array must include the **previous version's gate job** to enforce serial ordering. This ensures v20250224 finishes before v20300101 starts publishing.
249
+
**Important**: The `needs` array must include the **delay job for this version** to enforce staggered publishing. This creates a small delay before your version starts publishing, ensuring previous versions get first chance at npm registry.
250
250
251
251
**Location 4: Add release job for new version**
252
252
@@ -262,38 +262,40 @@ release-v20300101:
262
262
secrets: inherit
263
263
```
264
264
265
-
**Location 5: Add gate job for previous version**
265
+
**Location 5: Add delay job for new version**
266
266
267
-
Add a new gate job after the previous version's release to handle serial ordering:
267
+
Add a new delay job before the publish job to create staggered publishing:
@@ -234,32 +234,37 @@ fatal: A release with this tag already exists
234
234
235
235
**Expected Behavior**: `publish-v20250224` should run when only v20250224 is modified
236
236
237
-
**Root Cause**: Previous versions of the workflow had a dependency chain that broke when intermediate jobs were skipped. This has been fixed with the gate job pattern.
237
+
**Root Cause**: Previous versions of the workflow had dependencies that broke when intermediate jobs were skipped. This has been fixed with the delay job pattern.
4. If not present, update workflow from latest template
261
266
262
-
**Technical Details**: See [Workflow-and-Configuration-Reference.md](Workflow-and-Configuration-Reference.md#step-3-gate-job---unblock-v20250224-publishing) in the "Publishing via on-push-master.yml" section for full gate job implementation details.
267
+
**Technical Details**: See [Workflow-and-Configuration-Reference.md](Workflow-and-Configuration-Reference.md#step-3-delay-job---stagger-v20250224-publishing) in the "Publishing via on-push-master.yml" section for full delay job implementation details.
Copy file name to clipboardExpand all lines: docs/Workflow-and-Configuration-Reference.md
+56-43Lines changed: 56 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
**Document Purpose**: Detailed technical reference for the multi-version SDK generation, publishing, and release workflows. Covers implementation details, configuration files, and system architecture.
4
4
5
-
**Last Updated**: January 28, 2026
5
+
**Last Updated**: January 29, 2026
6
6
**Audience**: Developers who need to understand or modify the implementation
7
7
8
8
---
@@ -145,16 +145,17 @@ strategy:
145
145
4. Path-based filtering ensures only modified versions are published, never in parallel
**Architectural Approach**: Serial job chaining with gate job pattern ensures single-version and multi-version publishing both work correctly while preventing npm race conditions.
354
+
**Architectural Approach**: Serial job chaining with delay job ensures single-version and multi-version publishing both work correctly while preventing npm race conditions.
344
355
345
356
#### Step 1: Check Skip-Publish Flag
346
357
@@ -377,47 +388,49 @@ Include `[skip-publish]` in commit message to prevent publish/release for this p
377
388
1. Publish job calls `publish.yml` with `version_directory: v20111101`
378
389
2. Release job calls `release.yml` after publish completes
- **Only v20250224 modified**: delay job runs → after 2s, publish v20250224 runs (v20111101 jobs skipped, don't block)
426
+
- **Only v20111101 modified**: publish v20111101 runs, delay runs but is unused (no harm)
414
427
415
428
**Why Not Use Direct Dependencies?**
416
-
If v20250224 jobs depended directly on v20111101's release job, the workflow would fail whenever v20111101 was skipped (not modified). The gate job pattern enables:
429
+
If v20250224 jobs depended directly on v20111101's publish job, the workflow would fail whenever v20111101 was skipped (not modified). The delay job pattern enables:
417
430
- ✅ Correct behavior in single-version and multi-version scenarios
418
-
- ✅ Maintains serial ordering when both versions change
431
+
- ✅ Maintains serial ordering by staggering version publishes
419
432
- ✅ Prevents race conditions at npm registry level
420
-
- ✅ Clear, explicit dependency chain in GitHub Actions UI
433
+
- ✅ Simple, easy-to-understand logic
421
434
422
435
#### Step 4: Publish and Release v20250224 (Second in Serial Chain)
423
436
@@ -426,7 +439,7 @@ If v20250224 jobs depended directly on v20111101's release job, the workflow wou
426
439
**publish-v20250224 executes when**:
427
440
- No `[skip-publish]` flag
428
441
- Files in `v20250224/**` were changed
429
-
- **AND** `gate-v20111101-complete` completes (ensures serial ordering)
@@ -437,7 +450,7 @@ If v20250224 jobs depended directly on v20111101's release job, the workflow wou
437
450
1. Publish job calls `publish.yml` with `version_directory: v20250224`
438
451
2. Release job calls `release.yml` after publish completes
439
452
440
-
**Serial Chain Benefit**: Even though both versions could publish in parallel, the gate job ensures v20250224 waits for v20111101 release, preventing npm registry race conditions when both versions are modified.
453
+
**Serial Chain Benefit**: The 2-second delay before v20250224 starts publishing ensures v20111101 gets first chance at npm registry, preventing race conditions when both versions are modified.
0 commit comments