Skip to content

Commit

Permalink
feat(ci): add sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
Windsland52 committed Nov 30, 2024
1 parent 456dda5 commit 00dc706
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,40 @@ jobs:
with:
path: assets

- run: |
- name: Check assets directory
run: |
ls -la assets
if [ -z "$(ls -A assets)" ]; then
echo "assets directory is empty"
exit 1
fi
- name: Compress and generate checksums
run: |
cd assets
echo "Generating checksums for all zip files..."
checksum_file="checksums.txt"
touch "$checksum_file"
for f in *; do
(cd $f && zip -r ../$f-${{ needs.meta.outputs.tag }}.zip .)
if [ -d "$f" ]; then
echo "Processing directory: $f"
zip_file="$f-${{ needs.meta.outputs.tag }}.zip"
(cd "$f" && zip -r "../$zip_file" .)
if [ $? -eq 0 ]; then
echo "ZIP file created: ../$zip_file"
echo "Processing directory: $f"
sha256sum "$zip_file" >> "$checksum_file"
echo "" >> "$checksum_file"
else
echo "Failed to create ZIP file: ../$zip_file"
exit 1
fi
else
echo "Skipping non-directory: $f"
fi
done

- uses: softprops/action-gh-release@v2
with:
files: assets/*
Expand Down

0 comments on commit 00dc706

Please sign in to comment.