Skip to content

Commit 906f94d

Browse files
authored
Add Lambda Layer Release Workflow Step to Upload layer.zip to Latest SDK Release Note (#335)
*Description of changes:* Adding step to our Lambda Layer release workflow to upload `layer.zip` file to SDK release notes tagged with "latest" **Test plan:** Ran the `gh` commands locally and tested on release note in my forked repo for ADOT Java: Upload `layer.zip` to existing release note: https://github.com/yiyuan-he/aws-otel-java-instrumentation/releases/tag/v2.0.0 Create new release note with `layer.zip`: https://github.com/yiyuan-he/aws-otel-java-instrumentation/releases/tag/untagged-bfc0e9c6ba6bdc461832 <img width="1512" alt="Screenshot 2025-03-07 at 10 49 42 AM" src="https://github.com/user-attachments/assets/7a558efb-c80f-43be-ae52-fd2bc17d0598" /> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 3f5301c commit 906f94d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/release-lambda.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,10 @@ jobs:
212212
layer_arns.tf layer.zip
213213
echo Removing release_notes.md ...
214214
rm -f release_notes.md
215+
- name: Upload layer.zip to SDK Release Notes (tagged with latest)
216+
env:
217+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218+
run: |
219+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-python-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
220+
gh release upload "$LATEST_SDK_VERSION" layer.zip --repo "aws-observability/aws-otel-python-instrumentation" --clobber
221+
echo "✅ layer.zip successfully uploaded to $LATEST_SDK_VERSION in the upstream repo!"

.github/workflows/release_build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,15 @@ jobs:
132132
env:
133133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
134134
run: |
135+
# Download layer.zip from existing latest tagged SDK release note
136+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
137+
mkdir -p layer_artifact
138+
gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-java-instrumentation" --pattern "layer.zip" --dir layer_artifact
139+
135140
gh release create --target "$GITHUB_REF_NAME" \
136141
--title "Release v${{ github.event.inputs.version }}" \
137142
--draft \
138143
"v${{ github.event.inputs.version }}" \
139144
dist/${{ env.ARTIFACT_NAME }} \
140-
${{ env.ARTIFACT_NAME }}.sha256
145+
${{ env.ARTIFACT_NAME }}.sha256 \
146+
layer_artifact/layer.zip

0 commit comments

Comments
 (0)