File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,17 @@ jobs:
129
129
env :
130
130
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
131
131
run : |
132
+ # Download layer.zip from existing latest tagged SDK release note
133
+ LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
134
+ mkdir -p layer_artifact
135
+ gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-java-instrumentation" --pattern "layer.zip" --dir layer_artifact
136
+ shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256
137
+
132
138
gh release create --target "$GITHUB_REF_NAME" \
133
139
--title "Release v${{ github.event.inputs.version }}" \
134
140
--draft \
135
141
"v${{ github.event.inputs.version }}" \
136
142
${{ env.ARTIFACT_NAME }} \
137
- ${{ env.ARTIFACT_NAME }}.sha256
143
+ ${{ env.ARTIFACT_NAME }}.sha256 \
144
+ layer_artifact/layer.zip \
145
+ layer_artifact/layer.zip.sha256
Original file line number Diff line number Diff line change @@ -224,3 +224,13 @@ jobs:
224
224
layer_arns.tf layer.zip
225
225
echo Removing release_notes.md ...
226
226
rm -f release_notes.md
227
+ - name : Upload layer.zip and SHA-256 checksum to SDK Release Notes (tagged with latest)
228
+ env :
229
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
230
+ run : |
231
+ LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
232
+ # Generate SHA-256 checksum for layer.zip
233
+ shasum -a 256 layer.zip > layer.zip.sha256
234
+ # Upload layer.zip and its checksum to the latest SDK release note
235
+ gh release upload "$LATEST_SDK_VERSION" layer.zip layer.zip.sha256 --repo "aws-observability/aws-otel-java-instrumentation" --clobber
236
+ echo "✅ layer.zip successfully uploaded to $LATEST_SDK_VERSION in the upstream repo!"
You can’t perform that action at this time.
0 commit comments