28
28
default : true
29
29
30
30
jobs :
31
- generate-release-notes :
32
- name : Generate Release Notes
31
+ generate-release-notes-core-enterprise :
32
+ name : Generate Release Notes (Core/Enterprise)
33
33
runs-on : ubuntu-latest
34
+ if : contains(fromJSON('["core", "enterprise"]'), github.event.inputs.product)
34
35
outputs :
35
36
generated : ${{ steps.generate.outputs.generated }}
36
37
@@ -49,17 +50,117 @@ jobs:
49
50
- name : Generate release notes
50
51
id : generate
51
52
run : |
52
- echo "Generating release notes for ${{ github.event.inputs.product }} v${{ github.event.inputs.version }}"
53
+ echo "Generating Core/Enterprise release notes for ${{ github.event.inputs.product }} v${{ github.event.inputs.version }}"
53
54
54
- # TODO: Call the actual generate-release-notes script when it exists
55
- # node ./helper-scripts/influxdb3-monolith/generate-release-notes.js \
56
- # --product ${{ github.event.inputs.product }} \
57
- # --version ${{ github.event.inputs.version }} \
58
- # --previous ${{ github.event.inputs.previous_version }}
55
+ # Create output directory
56
+ mkdir -p helper-scripts/output/release-notes
57
+
58
+ # Note: This generates placeholder release notes since the actual repositories
59
+ # (influxdb and influxdb_pro) are not available in the GitHub Actions environment.
60
+ # To generate actual release notes, the script would need to be run locally with:
61
+ # node ./helper-scripts/common/generate-release-notes.js \
62
+ # --format core-enterprise \
63
+ # ${{ github.event.inputs.previous_version }} \
64
+ # ${{ github.event.inputs.version }} \
65
+ # /path/to/influxdb \
66
+ # /path/to/influxdb_pro
67
+
68
+ # Create structured placeholder that matches the expected format
69
+ cat > helper-scripts/output/release-notes/release-notes-${{ github.event.inputs.product }}-${{ github.event.inputs.version }}.md << EOF
70
+ > [!Note]
71
+ > #### InfluxDB 3 Core and Enterprise relationship
72
+ >
73
+ > InfluxDB 3 Enterprise is a superset of InfluxDB 3 Core.
74
+ > All updates to Core are automatically included in Enterprise.
75
+ > The Enterprise sections below only list updates exclusive to Enterprise.
76
+
77
+ ## ${{ github.event.inputs.version }} {date="$(date +'%Y-%m-%d')"}
78
+
79
+ ### Core
80
+
81
+ #### Features
82
+
83
+ - TODO: Add Core features for ${{ github.event.inputs.product }} ${{ github.event.inputs.version }}
84
+
85
+ #### Bug Fixes
86
+
87
+ - TODO: Add Core bug fixes for ${{ github.event.inputs.product }} ${{ github.event.inputs.version }}
88
+
89
+ ### Enterprise
90
+
91
+ All Core updates are included in Enterprise. Additional Enterprise-specific features and fixes:
92
+
93
+ #### Features
94
+
95
+ - TODO: Add Enterprise-specific features for ${{ github.event.inputs.version }}
96
+
97
+ #### Bug Fixes
98
+
99
+ - TODO: Add Enterprise-specific bug fixes for ${{ github.event.inputs.version }}
100
+ EOF
59
101
60
- # For now, create a placeholder
102
+ echo "generated=true" >> $GITHUB_OUTPUT
103
+
104
+ - name : Upload release notes
105
+ uses : actions/upload-artifact@v4
106
+ with :
107
+ name : release-notes-${{ github.event.inputs.product }}-${{ github.event.inputs.version }}
108
+ path : helper-scripts/output/release-notes/
109
+ retention-days : 30
110
+
111
+ generate-release-notes-distributed :
112
+ name : Generate Release Notes (Distributed)
113
+ runs-on : ubuntu-latest
114
+ if : contains(fromJSON('["clustered", "cloud-dedicated", "cloud-serverless"]'), github.event.inputs.product)
115
+ outputs :
116
+ generated : ${{ steps.generate.outputs.generated }}
117
+
118
+ steps :
119
+ - uses : actions/checkout@v4
120
+
121
+ - name : Set up Node.js
122
+ uses : actions/setup-node@v4
123
+ with :
124
+ node-version : ' 18'
125
+ cache : ' yarn'
126
+
127
+ - name : Install dependencies
128
+ run : yarn install --frozen-lockfile
129
+
130
+ - name : Generate release notes
131
+ id : generate
132
+ run : |
133
+ echo "Generating distributed product release notes for ${{ github.event.inputs.product }} v${{ github.event.inputs.version }}"
134
+
135
+ # Create output directory
61
136
mkdir -p helper-scripts/output/release-notes
62
- echo "# Release Notes for ${{ github.event.inputs.product }} v${{ github.event.inputs.version }}" > helper-scripts/output/release-notes/release-notes-${{ github.event.inputs.product }}-${{ github.event.inputs.version }}.md
137
+
138
+ # Note: This generates placeholder release notes since the actual repositories
139
+ # for distributed products are not available in the GitHub Actions environment.
140
+ # To generate actual release notes, the script would need to be run locally with:
141
+ # node ./helper-scripts/common/generate-release-notes.js \
142
+ # --format standard \
143
+ # ${{ github.event.inputs.previous_version }} \
144
+ # ${{ github.event.inputs.version }} \
145
+ # /path/to/repository
146
+
147
+ # Create structured placeholder for distributed products
148
+ cat > helper-scripts/output/release-notes/release-notes-${{ github.event.inputs.product }}-${{ github.event.inputs.version }}.md << EOF
149
+ ## ${{ github.event.inputs.version }} {date="$(date +'%Y-%m-%d')"}
150
+
151
+ ### Features
152
+
153
+ - TODO: Add features for ${{ github.event.inputs.product }} ${{ github.event.inputs.version }}
154
+
155
+ ### Bug Fixes
156
+
157
+ - TODO: Add bug fixes for ${{ github.event.inputs.product }} ${{ github.event.inputs.version }}
158
+
159
+ ### Performance Improvements
160
+
161
+ - TODO: Add performance improvements for ${{ github.event.inputs.product }} ${{ github.event.inputs.version }}
162
+ EOF
163
+
63
164
echo "generated=true" >> $GITHUB_OUTPUT
64
165
65
166
- name : Upload release notes
71
172
72
173
audit-cli-documentation :
73
174
name : Audit CLI Documentation
74
- needs : generate-release-notes
175
+ needs : generate-release-notes-core-enterprise
75
176
runs-on : ubuntu-latest
76
- if : needs.generate-release-notes.outputs.generated == 'true' && contains(fromJSON('["core", "enterprise"]'), github.event.inputs.product)
177
+ if : needs.generate-release-notes-core-enterprise .outputs.generated == 'true' && contains(fromJSON('["core", "enterprise"]'), github.event.inputs.product)
77
178
78
179
steps :
79
180
- uses : actions/checkout@v4
@@ -115,9 +216,9 @@ jobs:
115
216
116
217
audit-distributed-documentation :
117
218
name : Audit Distributed Products Documentation
118
- needs : generate-release-notes
219
+ needs : generate-release-notes-distributed
119
220
runs-on : ubuntu-latest
120
- if : needs.generate-release-notes.outputs.generated == 'true' && contains(fromJSON('["clustered", "cloud-dedicated", "cloud-serverless"]'), github.event.inputs.product)
221
+ if : needs.generate-release-notes-distributed .outputs.generated == 'true' && contains(fromJSON('["clustered", "cloud-dedicated", "cloud-serverless"]'), github.event.inputs.product)
121
222
122
223
steps :
123
224
- uses : actions/checkout@v4
@@ -174,9 +275,9 @@ jobs:
174
275
175
276
create-documentation-pr :
176
277
name : Create Documentation PR
177
- needs : [generate-release-notes, audit-cli-documentation, audit-distributed-documentation]
278
+ needs : [generate-release-notes-core-enterprise, generate-release-notes-distributed , audit-cli-documentation, audit-distributed-documentation]
178
279
runs-on : ubuntu-latest
179
- if : github.event.inputs.dry_run != 'true' && always() && needs.generate-release-notes.result == 'success'
280
+ if : github.event.inputs.dry_run != 'true' && always() && ( needs.generate-release-notes-core-enterprise .result == 'success' || needs.generate-release-notes-distributed.result == 'success')
180
281
181
282
steps :
182
283
- uses : actions/checkout@v4
@@ -194,8 +295,56 @@ jobs:
194
295
195
296
- name : Copy release notes to docs
196
297
run : |
197
- # TODO: Copy release notes to appropriate documentation location
198
- echo "Release notes would be copied here"
298
+ # Download the generated release notes artifact
299
+ PRODUCT="${{ github.event.inputs.product }}"
300
+ VERSION="${{ github.event.inputs.version }}"
301
+
302
+ # Determine the target documentation file based on product
303
+ case "$PRODUCT" in
304
+ "core"|"enterprise")
305
+ TARGET_FILE="content/shared/v3-core-enterprise-release-notes/_index.md"
306
+ SOURCE_FILE="artifacts/release-notes-${PRODUCT}-${VERSION}/release-notes-${PRODUCT}-${VERSION}.md"
307
+ ;;
308
+ "clustered")
309
+ TARGET_FILE="content/influxdb3/clustered/reference/release-notes/_index.md"
310
+ SOURCE_FILE="artifacts/release-notes-${PRODUCT}-${VERSION}/release-notes-${PRODUCT}-${VERSION}.md"
311
+ ;;
312
+ "cloud-dedicated")
313
+ TARGET_FILE="content/influxdb3/cloud-dedicated/reference/release-notes/_index.md"
314
+ SOURCE_FILE="artifacts/release-notes-${PRODUCT}-${VERSION}/release-notes-${PRODUCT}-${VERSION}.md"
315
+ ;;
316
+ "cloud-serverless")
317
+ TARGET_FILE="content/influxdb3/cloud-serverless/reference/release-notes/_index.md"
318
+ SOURCE_FILE="artifacts/release-notes-${PRODUCT}-${VERSION}/release-notes-${PRODUCT}-${VERSION}.md"
319
+ ;;
320
+ *)
321
+ echo "Unknown product: $PRODUCT"
322
+ exit 1
323
+ ;;
324
+ esac
325
+
326
+ # Check if source file exists
327
+ if [ -f "$SOURCE_FILE" ]; then
328
+ echo "Copying release notes from $SOURCE_FILE to $TARGET_FILE"
329
+
330
+ # For Core/Enterprise, prepend to existing file (new releases go at the top)
331
+ if [ "$PRODUCT" = "core" ] || [ "$PRODUCT" = "enterprise" ]; then
332
+ # Create temporary file with new content + existing content
333
+ cp "$SOURCE_FILE" temp_release_notes.md
334
+ echo "" >> temp_release_notes.md
335
+ cat "$TARGET_FILE" >> temp_release_notes.md
336
+ mv temp_release_notes.md "$TARGET_FILE"
337
+ else
338
+ # For other products, replace the file
339
+ cp "$SOURCE_FILE" "$TARGET_FILE"
340
+ fi
341
+
342
+ echo "Release notes successfully copied to documentation"
343
+ else
344
+ echo "Warning: Release notes file not found at $SOURCE_FILE"
345
+ echo "Available files in artifacts:"
346
+ find artifacts/ -type f -name "*.md" || echo "No markdown files found"
347
+ fi
199
348
200
349
- name : Create Pull Request
201
350
uses : peter-evans/create-pull-request@v5
@@ -327,7 +476,7 @@ jobs:
327
476
328
477
influxdb3-monolith-release-summary :
329
478
name : Release Summary
330
- needs : [generate-release-notes, audit-cli-documentation, audit-distributed-documentation, create-documentation-pr, create-audit-issue]
479
+ needs : [generate-release-notes-core-enterprise, generate-release-notes-distributed , audit-cli-documentation, audit-distributed-documentation, create-documentation-pr, create-audit-issue]
331
480
runs-on : ubuntu-latest
332
481
if : always()
333
482
@@ -346,7 +495,8 @@ jobs:
346
495
echo "## Workflow Results" >> $GITHUB_STEP_SUMMARY
347
496
echo "| Step | Status |" >> $GITHUB_STEP_SUMMARY
348
497
echo "|------|--------|" >> $GITHUB_STEP_SUMMARY
349
- echo "| Generate Release Notes | ${{ needs.generate-release-notes.result }} |" >> $GITHUB_STEP_SUMMARY
498
+ echo "| Generate Release Notes (Core/Enterprise) | ${{ needs.generate-release-notes-core-enterprise.result }} |" >> $GITHUB_STEP_SUMMARY
499
+ echo "| Generate Release Notes (Distributed) | ${{ needs.generate-release-notes-distributed.result }} |" >> $GITHUB_STEP_SUMMARY
350
500
echo "| CLI Documentation Audit | ${{ needs.audit-cli-documentation.result }} |" >> $GITHUB_STEP_SUMMARY
351
501
echo "| Distributed Documentation Audit | ${{ needs.audit-distributed-documentation.result }} |" >> $GITHUB_STEP_SUMMARY
352
502
echo "| Create Documentation PR | ${{ needs.create-documentation-pr.result }} |" >> $GITHUB_STEP_SUMMARY
0 commit comments