Skip to content

Commit e581a92

Browse files
committed
Add file hash generation and display in release metadata
- Updated GitHub workflow to compute SHA256 hashes for release assets. - Added hash output to release description for easier verification. - Minor edit in README for attribution.
1 parent 548e0b2 commit e581a92

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/build-native.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,22 @@ jobs:
121121
echo "Release assets:"
122122
ls -lh release-assets/
123123
124+
- name: Generate file hashes
125+
id: hashes
126+
run: |
127+
cd release-assets
128+
echo "## File Hashes (SHA256)" > hashes.txt
129+
echo "" >> hashes.txt
130+
echo "\`\`\`" >> hashes.txt
131+
sha256sum *.zip >> hashes.txt
132+
echo "\`\`\`" >> hashes.txt
133+
cat hashes.txt
134+
# Store hashes in output (escape newlines for GitHub Actions)
135+
HASHES=$(cat hashes.txt)
136+
echo "content<<EOF" >> $GITHUB_OUTPUT
137+
echo "$HASHES" >> $GITHUB_OUTPUT
138+
echo "EOF" >> $GITHUB_OUTPUT
139+
124140
- name: Create GitHub Release
125141
uses: softprops/action-gh-release@v1
126142
with:
@@ -129,6 +145,8 @@ jobs:
129145
Built for libssh2@${{ steps.libssh2-info.outputs.short }} (committed on ${{ steps.libssh2-info.outputs.date }})
130146
131147
Full commit: ${{ steps.libssh2-info.outputs.sha }}
148+
149+
${{ steps.hashes.outputs.content }}
132150
files: release-assets/*.zip
133151
draft: false
134152
prerelease: false

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Pre-compiled native libssh2 libraries for multiple platforms. This repository automates the building of [libssh2](https://github.com/libssh2/libssh2) for various operating systems and architectures.
44

5+
~~Proudly~~ vibecoded by Claude Code.
6+
57
## Supported Platforms
68

79
- **Windows**: x64

0 commit comments

Comments
 (0)