Skip to content

Commit 3d1feb2

Browse files
committed
Add checksum for wheel artifact and also add version.txt to keep track of latest version for release
1 parent fac2f0e commit 3d1feb2

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

.github/workflows/release_build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,28 @@ jobs:
131131
--draft \
132132
"v${{ github.event.inputs.version }}" \
133133
dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl
134+
135+
- name: Get SHA256 checksum of wheel file
136+
id: get_sha256
137+
env:
138+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139+
run: |
140+
checksum=$(shasum -a 256 dist/aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl | awk '{ print $1 }')
141+
echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT
142+
143+
- name: Append checksum and update version
144+
env:
145+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146+
run: |
147+
echo "aws_opentelemetry_distro-${{ github.event.inputs.version }}-py3-none-any.whl ${{ steps.get_sha256.outputs.CHECKSUM }}" >> checksum.txt
148+
echo "${{ github.event.inputs.version }}" > version.txt
149+
150+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
151+
git config --local user.name "GitHub Action Release Workflow"
152+
git add checksum.txt version.txt
153+
git commit -m "Update latest version and append checksum"
154+
git push
155+
156+
157+
158+

checksum.txt

Whitespace-only changes.

version.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)