Skip to content

Commit 211ae0b

Browse files
committed
add CHANGELOG and enhance release notes
1 parent 4b67baf commit 211ae0b

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/release-build.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,20 +412,39 @@ jobs:
412412
OTEL_INSTRUMENTATION_VERSION=$(grep "val otelVersion" dependencyManagement/build.gradle.kts | sed 's/.*= "\([^"]*\)".*/\1/')
413413
OTEL_CONTRIB_VERSION=$(grep "io.opentelemetry.contrib:opentelemetry-aws-xray" dependencyManagement/build.gradle.kts | sed 's/.*:\([^"]*\)".*/\1/')
414414
415+
# Extract CHANGELOG entries for this version
416+
CHANGELOG_ENTRIES=$(python3 -c "
417+
import re
418+
with open('CHANGELOG.md', 'r') as f:
419+
content = f.read()
420+
version_pattern = r'## v${{ github.event.inputs.version }}.*?\n(.*?)(?=\n## |\Z)'
421+
version_match = re.search(version_pattern, content, re.DOTALL)
422+
if version_match:
423+
entries = version_match.group(1).strip()
424+
if entries:
425+
print(entries)
426+
")
427+
415428
# Create release notes
416429
cat > release_notes.md << EOF
417-
This release contains updates of the following upstream components:
430+
$(if [ -n "$CHANGELOG_ENTRIES" ]; then echo "## What's Changed"; echo "$CHANGELOG_ENTRIES"; echo ""; fi)
431+
432+
## Upstream Components
418433
419-
OpenTelemetry Java Contrib - $OTEL_CONTRIB_VERSION
420-
Opentelemetry Instrumentation for Java - $OTEL_INSTRUMENTATION_VERSION
434+
- \`OpenTelemetry Java Contrib\` - $OTEL_CONTRIB_VERSION
435+
- \`Opentelemetry Instrumentation for Java\` - $OTEL_INSTRUMENTATION_VERSION
421436
422-
This release also publishes to public ECR and Maven Central.
437+
## Release Artifacts
438+
439+
This release publishes to public ECR and Maven Central.
423440
* See ADOT Java auto-instrumentation Docker image v${{ github.event.inputs.version }} in our public ECR repository:
424441
https://gallery.ecr.aws/aws-observability/adot-autoinstrumentation-java
425442
* See version ${{ github.event.inputs.version }} in our Maven Central repository:
426443
https://central.sonatype.com/artifact/software.amazon.opentelemetry/aws-opentelemetry-agent
427444
428-
This release also includes the AWS OpenTelemetry Lambda Layer for Java version ${{ github.event.inputs.version }}-$(echo $GITHUB_SHA | cut -c1-7).
445+
## Lambda Layer
446+
447+
This release includes the AWS OpenTelemetry Lambda Layer for Java version ${{ github.event.inputs.version }}-$(echo $GITHUB_SHA | cut -c1-7).
429448
430449
Lambda Layer ARNs:
431450
${{ needs.generate-lambda-release-note.outputs.layer-note }}

0 commit comments

Comments
 (0)