Skip to content

Commit 8f8ca67

Browse files
authored
Update SDK and Lambda Layer Release Workflows to Add layer.zip Artifacts (#182)
1 parent be2656e commit 8f8ca67

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/release_build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@ jobs:
134134
./installationScripts/AWS.Otel.DotNet.Auto.psm1 \
135135
AWS.Otel.DotNet.Auto.psm1.sha256 \
136136
--clobber
137+
# Download layer.zip from existing latest tagged SDK release note
138+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-dotnet-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
139+
mkdir -p layer_artifact
140+
gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-dotnet-instrumentation" --pattern "layer.zip" --dir layer_artifact
141+
shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256
142+
gh release upload "v${{ github.event.inputs.version }}" \
143+
layer_artifact/layer.zip \
144+
layer_artifact/layer.zip.sha256 \
145+
--clobber
137146
138147
release-image:
139148
# We want to build and release nuget first so that if it fails, it fails before publishing to private ECR
@@ -376,4 +385,4 @@ jobs:
376385
nuget push
377386
.\Deployment\nuget-packages\*.nupkg
378387
-Source https://api.nuget.org/v3/index.json
379-
-ApiKey $nugetKey.Key
388+
-ApiKey $nugetKey.Key

.github/workflows/release_lambda.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,13 @@ jobs:
209209
layer_arns.tf layer.zip
210210
echo Removing release_notes.md ...
211211
rm -f release_notes.md
212+
- name: Upload layer.zip and SHA-256 checksum to SDK Release Notes (tagged with latest)
213+
env:
214+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
215+
run: |
216+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-dotnet-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
217+
# Generate SHA-256 checksum for layer.zip
218+
shasum -a 256 layer.zip > layer.zip.sha256
219+
# Upload layer.zip and its checksum to the latest SDK release note
220+
gh release upload "$LATEST_SDK_VERSION" layer.zip layer.zip.sha256 --repo "aws-observability/aws-otel-dotnet-instrumentation" --clobber
221+
echo "✅ layer.zip successfully uploaded to $LATEST_SDK_VERSION in the upstream repo!"

0 commit comments

Comments
 (0)