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:
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 '@aws/aws-distro-opentelemetry-node-autoinstrumentation' to npm
109117      - name : Publish autoinstrumentation to npm 
@@ -113,4 +121,3 @@ jobs:
113121          NPM_CONFIG_PROVENANCE : true 
114122        run : npm publish 
115123
116-     
Original file line number Diff line number Diff line change @@ -217,3 +217,13 @@ jobs:
217217            layer_arns.tf layer.zip 
218218          echo Removing release_notes.md ... 
219219          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