Skip to content

Commit d107f08

Browse files
authored
Update SDK and Lambda Layer Release Workflows to Add layer.zip Artifacts (#1038)
*Description of changes:* Same as: aws-observability/aws-otel-python-instrumentation#335 and aws-observability/aws-otel-python-instrumentation#337 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 77dec60 commit d107f08

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/release-build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,17 @@ jobs:
129129
env:
130130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
131131
run: |
132+
# Download layer.zip from existing latest tagged SDK release note
133+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
134+
mkdir -p layer_artifact
135+
gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-java-instrumentation" --pattern "layer.zip" --dir layer_artifact
136+
shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256
137+
132138
gh release create --target "$GITHUB_REF_NAME" \
133139
--title "Release v${{ github.event.inputs.version }}" \
134140
--draft \
135141
"v${{ github.event.inputs.version }}" \
136142
${{ env.ARTIFACT_NAME }} \
137-
${{ env.ARTIFACT_NAME }}.sha256
143+
${{ env.ARTIFACT_NAME }}.sha256 \
144+
layer_artifact/layer.zip \
145+
layer_artifact/layer.zip.sha256

.github/workflows/release-lambda.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,13 @@ jobs:
224224
layer_arns.tf layer.zip
225225
echo Removing release_notes.md ...
226226
rm -f release_notes.md
227+
- name: Upload layer.zip and SHA-256 checksum to SDK Release Notes (tagged with latest)
228+
env:
229+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
230+
run: |
231+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
232+
# Generate SHA-256 checksum for layer.zip
233+
shasum -a 256 layer.zip > layer.zip.sha256
234+
# Upload layer.zip and its checksum to the latest SDK release note
235+
gh release upload "$LATEST_SDK_VERSION" layer.zip layer.zip.sha256 --repo "aws-observability/aws-otel-java-instrumentation" --clobber
236+
echo "✅ layer.zip successfully uploaded to $LATEST_SDK_VERSION in the upstream repo!"

0 commit comments

Comments
 (0)