Skip to content

Commit 234cd36

Browse files
committed
update sdk and lambda layer release workflows to add layer.zip
1 parent 5801a1c commit 234cd36

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/release_build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ 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
146+
137147
138148
release-image:
139149
# We want to build and release nuget first so that if it fails, it fails before publishing to private ECR
@@ -376,4 +386,4 @@ jobs:
376386
nuget push
377387
.\Deployment\nuget-packages\*.nupkg
378388
-Source https://api.nuget.org/v3/index.json
379-
-ApiKey $nugetKey.Key
389+
-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)