Skip to content

Commit b9eefb8

Browse files
committed
Add checksum for wheel artifact and also add version.txt
1 parent 536c5e9 commit b9eefb8

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

.github/workflows/release-build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,24 @@ jobs:
127127
--draft \
128128
"v${{ github.event.inputs.version }}" \
129129
aws-opentelemetry-agent.jar
130+
131+
- name: Get SHA256 checksum of wheel file
132+
id: get_sha256
133+
env:
134+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135+
run: |
136+
checksum=$(shasum -a 256 aws-opentelemetry-agent.jar | awk '{ print $1 }')
137+
echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT
138+
139+
- name: Append checksum and update version
140+
env:
141+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142+
run: |
143+
echo "${{ github.event.inputs.version }} ${{ steps.get_sha256.outputs.CHECKSUM }}" >> checksum.txt
144+
echo "${{ github.event.inputs.version }}" > version.txt
145+
146+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
147+
git config --local user.name "GitHub Action Release Workflow"
148+
git add checksum.txt version.txt
149+
git commit -m "Update latest version and append checksum"
150+
git push

checksum.txt

Whitespace-only changes.

version.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)