File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 2020 - name : Checkout repository
2121 if : steps.release.outputs.release_created == 'true'
2222 uses : actions/checkout@v4
23+ - name : Update README checksum
24+ if : steps.release.outputs.release_created == 'true'
25+ env :
26+ TAG_NAME : ${{ steps.release.outputs.tag_name }}
27+ run : |
28+ set -euo pipefail
29+ curl -Ls "https://github.com/${GITHUB_REPOSITORY}/archive/refs/tags/${TAG_NAME}.tar.gz" -o source.tar.gz
30+ SHA=$(shasum -a 256 source.tar.gz | awk '{print $1}')
31+ rm source.tar.gz
32+ sed -i "s/sha256 = \"[0-9a-f]\{64\}\"/sha256 = \"${SHA}\"/" README.md
33+ if git diff --quiet README.md; then
34+ echo "Checksum already up to date"
35+ else
36+ git config user.name "github-actions[bot]"
37+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+ git add README.md
39+ git commit -m "docs: update checksum for ${TAG_NAME}"
40+ git push
41+ fi
2342 - name : Enrich release notes with install instructions
2443 if : steps.release.outputs.release_created == 'true'
2544 env :
You can’t perform that action at this time.
0 commit comments