Skip to content

Commit 33f7c99

Browse files
committed
add logic to sdk release workflow to copy layer.zip from previous latest release notes
1 parent e56be94 commit 33f7c99

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.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)