diff --git a/.github/workflows/release-lambda.yml b/.github/workflows/release-lambda.yml index 7799dfe4d..fa24d648a 100644 --- a/.github/workflows/release-lambda.yml +++ b/.github/workflows/release-lambda.yml @@ -212,10 +212,13 @@ jobs: layer_arns.tf layer.zip echo Removing release_notes.md ... rm -f release_notes.md - - name: Upload layer.zip to SDK Release Notes (tagged with latest) + - name: Upload layer.zip and SHA-256 checksum to SDK Release Notes (tagged with latest) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-python-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName') - gh release upload "$LATEST_SDK_VERSION" layer.zip --repo "aws-observability/aws-otel-python-instrumentation" --clobber + # Generate SHA-256 checksum for layer.zip + shasum -a 256 layer.zip > layer.zip.sha256 + # Upload layer.zip and its checksum to the latest SDK release note + gh release upload "$LATEST_SDK_VERSION" layer.zip layer.zip.sha256 --repo "aws-observability/aws-otel-python-instrumentation" --clobber echo "✅ layer.zip successfully uploaded to $LATEST_SDK_VERSION in the upstream repo!" diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index c855e6dc5..e3c8fcf29 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -133,9 +133,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token run: | # Download layer.zip from existing latest tagged SDK release note - LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName') + LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-python-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName') mkdir -p layer_artifact - gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-java-instrumentation" --pattern "layer.zip" --dir layer_artifact + gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-python-instrumentation" --pattern "layer.zip" --dir layer_artifact + shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256 gh release create --target "$GITHUB_REF_NAME" \ --title "Release v${{ github.event.inputs.version }}" \ @@ -143,4 +144,5 @@ jobs: "v${{ github.event.inputs.version }}" \ dist/${{ env.ARTIFACT_NAME }} \ ${{ env.ARTIFACT_NAME }}.sha256 \ - layer_artifact/layer.zip + layer_artifact/layer.zip \ + layer_artifact/layer.zip.sha256