File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,20 @@ jobs:
98
98
env :
99
99
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
100
100
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
+
101
107
gh release create --target "$GITHUB_REF_NAME" \
102
108
--title "Release v${{ github.event.inputs.version }}" \
103
109
--draft \
104
110
"v${{ github.event.inputs.version }}" \
105
111
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
107
115
108
116
# Publish '@aws/aws-distro-opentelemetry-node-autoinstrumentation' to npm
109
117
- name : Publish autoinstrumentation to npm
@@ -113,4 +121,3 @@ jobs:
113
121
NPM_CONFIG_PROVENANCE : true
114
122
run : npm publish
115
123
116
-
Original file line number Diff line number Diff line change @@ -217,3 +217,13 @@ jobs:
217
217
layer_arns.tf layer.zip
218
218
echo Removing release_notes.md ...
219
219
rm -f release_notes.md
220
+ - name : Upload layer.zip and SHA-256 checksum to SDK Release Notes (tagged with latest)
221
+ env :
222
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
223
+ run : |
224
+ LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-js-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
225
+ # Generate SHA-256 checksum for layer.zip
226
+ shasum -a 256 layer.zip > layer.zip.sha256
227
+ # Upload layer.zip and its checksum to the latest SDK release note
228
+ gh release upload "$LATEST_SDK_VERSION" layer.zip layer.zip.sha256 --repo "aws-observability/aws-otel-js-instrumentation" --clobber
229
+ 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