Skip to content

Commit b284a79

Browse files
committed
add CHANGELOG and enhance release notes
1 parent 3bf07f1 commit b284a79

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.github/workflows/release-build.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,19 +351,39 @@ jobs:
351351
console.log(deps);
352352
")
353353
354+
# Extract CHANGELOG entries for this version
355+
CHANGELOG_ENTRIES=$(node -e "
356+
const fs = require('fs');
357+
const content = fs.readFileSync('CHANGELOG.md', 'utf8');
358+
const versionPattern = new RegExp(\`## v\${{ github.event.inputs.version }}.*?\\n(.*?)(?=\\n## |$)\`, 'gs');
359+
const versionMatch = content.match(versionPattern);
360+
if (versionMatch && versionMatch[0]) {
361+
const entries = versionMatch[0].replace(/^## v\${{ github.event.inputs.version }}.*?\\n/, '').trim();
362+
if (entries) {
363+
console.log(entries);
364+
}
365+
}
366+
")
367+
354368
# Create release notes
355369
cat > release_notes.md << EOF
356-
This release contains the following upstream components:
370+
$(if [ -n "$CHANGELOG_ENTRIES" ]; then echo "## What's Changed"; echo "$CHANGELOG_ENTRIES"; echo ""; fi)
371+
372+
## Upstream Components
357373
358374
$DEPS
359375
360-
This release also publishes to public ECR and NPM.
376+
## Release Artifacts
377+
378+
This release publishes to public ECR and NPM.
361379
* See ADOT node auto-instrumentation Docker image v${{ github.event.inputs.version }} in our public ECR repository:
362380
https://gallery.ecr.aws/aws-observability/adot-autoinstrumentation-node
363381
* See version ${{ github.event.inputs.version }} in our NPM repository:
364382
https://www.npmjs.com/package/@aws/aws-distro-opentelemetry-node-autoinstrumentation
365383
366-
This release also includes the AWS OpenTelemetry Lambda Layer for JavaScript version ${{ github.event.inputs.version }}-$(echo $GITHUB_SHA | cut -c1-7).
384+
## Lambda Layer
385+
386+
This release includes the AWS OpenTelemetry Lambda Layer for JavaScript version ${{ github.event.inputs.version }}-$(echo $GITHUB_SHA | cut -c1-7).
367387
368388
Lambda Layer ARNs:
369389
${{ needs.generate-lambda-release-note.outputs.layer-note }}

0 commit comments

Comments
 (0)