-
Notifications
You must be signed in to change notification settings - Fork 431
Add SHA256 checksum generation to release builds #1994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Create reusable generate_checksums action in .github/actions - Update desktop_cd.yaml publish job to generate checksums for all artifacts - Checksums are uploaded to GitHub Releases alongside binaries Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughAdds a new GitHub composite action that generates SHA-256 checksum files for provided artifacts and integrates that action into the desktop CD workflow to conditionally include generated checksum files in the aggregated release artifacts. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (4)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/desktop_cd.yaml (1)
308-314: Consider simplifying the input format using conditional flow.The current approach uses ternary expressions (
${{ condition && 'file' || '' }}) that produce empty lines, which the downstream action must skip. While this works, a clearer pattern would be to conditionally output file names only when needed.Consider refactoring to explicitly build the input list:
- id: checksums uses: ./.github/actions/generate_checksums with: files: | ${{ needs.build-macos.result == 'success' && format('hyprnote-macos-aarch64.dmg{0}hyprnote-macos-x86_64.dmg', char(10)) || '' }} ${{ needs.build-linux.result == 'success' && 'hyprnote-linux-x86_64.AppImage' || '' }}Alternatively, construct the input dynamically in a preceding script step to avoid empty lines entirely.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/actions/generate_checksums/action.yaml(1 hunks).github/workflows/desktop_cd.yaml(2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/desktop_cd.yaml
309-309: description is required in metadata of "" action at "/home/jailuser/git/.github/actions/generate_checksums/action.yaml"
(action)
309-309: name is required in action metadata "/home/jailuser/git/.github/actions/generate_checksums/action.yaml"
(action)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Redirect rules - hyprnote
- GitHub Check: Header rules - hyprnote
- GitHub Check: Pages changed - hyprnote
- GitHub Check: fmt
🔇 Additional comments (2)
.github/workflows/desktop_cd.yaml (1)
332-334: Artifact integration logic is sound.The conditional appending of checksums to the artifacts list is correct. The check for non-empty
checksum_filesoutput ensures checksums are only included when available, and the comma-separated format matches the expected artifacts list structure..github/actions/generate_checksums/action.yaml (1)
11-40: Bash implementation is well-structured with solid error handling.The script correctly uses strict mode (
set -euo pipefail), validates file existence before processing, properly skips empty lines, and generates checksums with correct output formatting. The comma-separated list construction for multiple files is accurate.
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Summary
Adds SHA256 checksum generation for desktop release artifacts. Each release will now include
.sha256files alongside the binaries (DMG and AppImage files) in GitHub Releases.Changes:
.github/actions/generate_checksumsthat generates SHA256 checksums for a list of filesdesktop_cd.yamlpublish job to generate checksums after downloading artifacts from R2 and include them in the releaseUpdates since last revision
nameanddescriptionmetadata fields to the composite action (per CodeRabbit review)Review & Testing Checklist for Human
.sha256files appear in the GitHub Release assetsNotes
This PR only covers the CI/workflow side. The changelog page (
apps/web/src/routes/_view/changelog/$slug.tsx) will need a separate update to display checksum links to users (similar to Docker Desktop's UI).The action uses
sha256sumwhich is available on the Linux runner (depot-ubuntu-24.04-8) used by the publish job.Link to Devin run: https://app.devin.ai/sessions/737f0cd7c8fb4b14b08f5ee7061e0f69
Requested by: yujonglee (@yujonglee)