Skip to content

Commit 16b1012

Browse files
committed
add sha256 artifact to sdk and lambda layer release workflows
1 parent 906f94d commit 16b1012

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/release-lambda.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,13 @@ 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)
215+
- name: Upload layer.zip and SHA-256 checksum to SDK Release Notes (tagged with latest)
216216
env:
217217
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218218
run: |
219219
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
220+
# Generate SHA-256 checksum for layer.zip
221+
shasum -a 256 layer.zip > layer.zip.sha256
222+
# Upload layer.zip and its checksum to the latest SDK release note
223+
gh release upload "$LATEST_SDK_VERSION" layer.zip layer.zip.sha256 --repo "aws-observability/aws-otel-python-instrumentation" --clobber
221224
echo "✅ layer.zip successfully uploaded to $LATEST_SDK_VERSION in the upstream repo!"

.github/workflows/release_build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,13 @@ jobs:
136136
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
137137
mkdir -p layer_artifact
138138
gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-java-instrumentation" --pattern "layer.zip" --dir layer_artifact
139+
shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256
139140
140141
gh release create --target "$GITHUB_REF_NAME" \
141142
--title "Release v${{ github.event.inputs.version }}" \
142143
--draft \
143144
"v${{ github.event.inputs.version }}" \
144145
dist/${{ env.ARTIFACT_NAME }} \
145146
${{ env.ARTIFACT_NAME }}.sha256 \
146-
layer_artifact/layer.zip
147+
layer_artifact/layer.zip \
148+
layer_artifact/layer.zip.sha256

0 commit comments

Comments
 (0)