Skip to content

Commit 229569a

Browse files
committed
update sdk and lambda layer release workflows to add layer.zip
1 parent ba00b11 commit 229569a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/release-build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,20 @@ jobs:
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
100100
run: |
101+
# Download layer.zip from existing latest tagged SDK release note
102+
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-js-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
103+
mkdir -p layer_artifact
104+
gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-js-instrumentation" --pattern "layer.zip" --dir layer_artifact
105+
shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256
106+
101107
gh release create --target "$GITHUB_REF_NAME" \
102108
--title "Release v${{ github.event.inputs.version }}" \
103109
--draft \
104110
"v${{ github.event.inputs.version }}" \
105111
aws-distro-opentelemetry-node-autoinstrumentation/${{ env.ARTIFACT_NAME }} \
106-
${{ env.ARTIFACT_NAME }}.sha256
112+
${{ env.ARTIFACT_NAME }}.sha256 \
113+
layer_artifact/layer.zip \
114+
layer_artifact/layer.zip.sha256
107115
108116
# Publish to npm
109117
- name: Publish to npm
@@ -112,4 +120,3 @@ jobs:
112120
NPM_CONFIG_PROVENANCE: true
113121
run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
114122

115-

.github/workflows/release-lambda.yml

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

0 commit comments

Comments
 (0)