8181 steps :
8282 - name : Set up regions matrix
8383 id : set-matrix
84+ env :
85+ AWS_REGIONS : ${{ github.event.inputs.aws_region }}
8486 run : |
85- IFS=',' read -ra REGIONS <<< "${{ github.event.inputs.aws_region }} "
87+ IFS=',' read -ra REGIONS <<< "$AWS_REGIONS "
8688 MATRIX="["
8789 for region in "${REGIONS[@]}"; do
8890 trimmed_region=$(echo "$region" | xargs)
@@ -341,6 +343,7 @@ jobs:
341343 id : create_release
342344 env :
343345 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
346+ VERSION : ${{ github.event.inputs.version }}
344347 run : |
345348 # Generate dependency versions from package.json
346349 DEPS=$(node -e "
@@ -351,19 +354,39 @@ jobs:
351354 console.log(deps);
352355 ")
353356
357+ # Extract CHANGELOG entries for this version
358+ CHANGELOG_ENTRIES=$(python3 -c "
359+ import re, os
360+ version = os.environ['VERSION']
361+ with open('CHANGELOG.md', 'r') as f:
362+ content = f.read()
363+ version_pattern = rf'## v{re.escape(version)}.*?\n(.*?)(?=\n## |\Z)'
364+ version_match = re.search(version_pattern, content, re.DOTALL)
365+ if version_match:
366+ entries = version_match.group(1).strip()
367+ if entries:
368+ print(entries)
369+ ")
370+
354371 # Create release notes
355372 cat > release_notes.md << EOF
356- This release contains the following upstream components:
373+ $(if [ -n "$CHANGELOG_ENTRIES" ]; then echo "## What's Changed"; echo "$CHANGELOG_ENTRIES"; echo ""; fi)
374+
375+ ## Upstream Components
357376
358377 $DEPS
359378
360- This release also publishes to public ECR and NPM.
361- * See ADOT node auto-instrumentation Docker image v${{ github.event.inputs.version }} in our public ECR repository:
379+ ## Release Artifacts
380+
381+ This release publishes to public ECR and NPM.
382+ * See ADOT node auto-instrumentation Docker image v$VERSION in our public ECR repository:
362383 https://gallery.ecr.aws/aws-observability/adot-autoinstrumentation-node
363- * See version ${{ github.event.inputs.version }} in our NPM repository:
384+ * See version $VERSION in our NPM repository:
364385 https://www.npmjs.com/package/@aws/aws-distro-opentelemetry-node-autoinstrumentation
365386
366- This release also includes the AWS OpenTelemetry Lambda Layer for JavaScript version ${{ github.event.inputs.version }}-$(echo $GITHUB_SHA | cut -c1-7).
387+ ## Lambda Layer
388+
389+ This release includes the AWS OpenTelemetry Lambda Layer for JavaScript version $VERSION-$(echo $GITHUB_SHA | cut -c1-7).
367390
368391 Lambda Layer ARNs:
369392 ${{ needs.generate-lambda-release-note.outputs.layer-note }}
@@ -373,10 +396,10 @@ jobs:
373396 shasum -a 256 layer.zip > layer.zip.sha256
374397
375398 gh release create --target "$GITHUB_REF_NAME" \
376- --title "Release v${{ github.event.inputs.version }} " \
399+ --title "Release v$VERSION " \
377400 --notes-file release_notes.md \
378401 --draft \
379- "v${{ github.event.inputs.version }} " \
402+ "v$VERSION " \
380403 ${{ env.ARTIFACT_NAME }} \
381404 ${{ env.ARTIFACT_NAME }}.sha256 \
382405 layer.zip \
0 commit comments