Skip to content

Commit a5bf4c7

Browse files
committed
Add checksum for wheel artifact and also add version.txt
1 parent 425264c commit a5bf4c7

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
@@ -104,5 +104,26 @@ jobs:
104104
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
105105
NPM_CONFIG_PROVENANCE: true
106106
run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
107+
108+
- name: Get SHA256 checksum of wheel file
109+
id: get_sha256
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
run: |
113+
checksum=$(shasum -a 256 aws-distro-opentelemetry-node-autoinstrumentation/aws-aws-distro-opentelemetry-node-autoinstrumentation-${{ github.event.inputs.version }}.tgz | awk '{ print $1 }')
114+
echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT
115+
116+
- name: Append checksum and update version
117+
env:
118+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
run: |
120+
echo "aws-aws-distro-opentelemetry-node-autoinstrumentation-${{ github.event.inputs.version }}.tgz ${{ steps.get_sha256.outputs.CHECKSUM }}" >> checksum.txt
121+
echo "${{ github.event.inputs.version }}" > version.txt
122+
123+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
124+
git config --local user.name "GitHub Action Release Workflow"
125+
git add checksum.txt version.txt
126+
git commit -m "Update latest version and append checksum"
127+
git push
107128
108129

checksum.txt

Whitespace-only changes.

version.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)