From b9eefb8db222e97e10661dc09196f82131c3e18b Mon Sep 17 00:00:00 2001 From: Harry Date: Fri, 1 Nov 2024 14:52:06 -0700 Subject: [PATCH] Add checksum for wheel artifact and also add version.txt --- .github/workflows/release-build.yml | 21 +++++++++++++++++++++ checksum.txt | 0 version.txt | 0 3 files changed, 21 insertions(+) create mode 100644 checksum.txt create mode 100644 version.txt diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 5ddb016af7..9e6fa37e17 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -127,3 +127,24 @@ jobs: --draft \ "v${{ github.event.inputs.version }}" \ aws-opentelemetry-agent.jar + + - name: Get SHA256 checksum of wheel file + id: get_sha256 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + checksum=$(shasum -a 256 aws-opentelemetry-agent.jar | awk '{ print $1 }') + echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT + + - name: Append checksum and update version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "${{ github.event.inputs.version }} ${{ steps.get_sha256.outputs.CHECKSUM }}" >> checksum.txt + echo "${{ github.event.inputs.version }}" > version.txt + + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "GitHub Action Release Workflow" + git add checksum.txt version.txt + git commit -m "Update latest version and append checksum" + git push diff --git a/checksum.txt b/checksum.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..e69de29bb2