Skip to content

Commit

Permalink
Add checksum for wheel artifact and also add version.txt to keep trac…
Browse files Browse the repository at this point in the history
…k of latest version for release
  • Loading branch information
harrryr committed Nov 1, 2024
1 parent fac2f0e commit 1e5fc23
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,28 @@ jobs:
--draft \
"v${{ github.event.inputs.version }}" \
dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
- name: Get SHA256 checksum of wheel file
id: get_sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
checksum=$(shasum -a 256 dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl | awk '{ print $1 }')
echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT
- name: Append checksum and update version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl ${{ 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

0 comments on commit 1e5fc23

Please sign in to comment.