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