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
Copy file name to clipboardExpand all lines: docs/Adding-a-New-API-Version.md
+62-21Lines changed: 62 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,9 +187,36 @@ This ensures when multiple versions are generated, changelog entries appear in o
187
187
188
188
### 2.4 Update on-push-master.yml
189
189
190
-
This workflow automatically triggers publish and release jobs when version directories are pushed to master. Since individual version jobs use conditional `if` statements based on path changes, you need to add new conditional jobs for your new version.
190
+
This workflow automatically triggers publish and release jobs when version directories are pushed to master. The workflow uses path-based detection (via `dorny/paths-filter`) to determine which versions were modified, then conditionally runs the appropriate publish/release jobs in serial order.
191
191
192
-
**Location 1: Path trigger**
192
+
**Location 1: Update detect-changes job with new version filter**
193
+
194
+
In the `detect-changes` job's filter section, add your new version:
195
+
196
+
```yaml
197
+
detect-changes:
198
+
runs-on: ubuntu-latest
199
+
outputs:
200
+
v20111101: ${{ steps.filter.outputs.v20111101 }}
201
+
v20250224: ${{ steps.filter.outputs.v20250224 }}
202
+
v20300101: ${{ steps.filter.outputs.v20300101 }} # NEW output
203
+
steps:
204
+
- uses: actions/checkout@v3
205
+
- uses: dorny/paths-filter@v2
206
+
id: filter
207
+
with:
208
+
filters: |
209
+
v20111101:
210
+
- 'v20111101/**'
211
+
v20250224:
212
+
- 'v20250224/**'
213
+
v20300101: # NEW filter
214
+
- 'v20300101/**'
215
+
```
216
+
217
+
This is **critical**: Without this, the path detection won't work for your new version, and the publish/release jobs won't trigger when it's modified.
218
+
219
+
**Location 2: Add path trigger**
193
220
194
221
In the `on.push.paths` section, add a new path for your version:
195
222
@@ -205,55 +232,68 @@ on:
205
232
206
233
This ensures the workflow triggers when changes to your version directory are pushed to master.
207
234
208
-
**Location 2: Add publish job for new version**
235
+
**Location 3: Add publish job for new version**
209
236
210
237
Add a new publish job for your version (copy and modify the existing v20250224 jobs):
211
238
212
239
```yaml
213
240
publish-v20300101:
214
-
runs-on: ubuntu-latest
215
-
needs: [check-skip-publish, gate-v20250224-complete] # Gate waits for previous version
**Important**: The `needs` array must include the **previous version's gate job** to enforce serial ordering. This ensures v20250224 finishes before v20300101 starts publishing.
0 commit comments