Repository navigation
feat(granola): add cargo-dist for per-platform binary builds and npm package - #2355
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
- Add package.json with name 'export-granola' and bin entry - Add bin/export-granola.js wrapper script to execute platform binary - Add scripts/postinstall.js to download pre-built binaries - Add README.md with usage documentation - Update Cargo.toml with package metadata 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 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…lable - Exit with code 0 on 404 (binary not yet published) - Exit with code 0 on other download errors to not break CI - Improve error messages for developers Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
- Add cargo-dist configuration (dist-workspace.toml) with npm, shell, and powershell installers - Configure granola-cli as the only distributable package (dist = false at workspace level) - Add GitHub Actions workflow (release.yml) for automated releases on version tags - Set npm package name to 'export-granola' for npx access - Remove manual npm package files (bin/, scripts/, package.json) in favor of cargo-dist generated package - Update README.md with additional installation methods (shell script, PowerShell) The release workflow will: - Build binaries for macOS (x64/arm64), Linux (x64/arm64), and Windows (x64) - Generate npm package for 'npx export-granola' access - Generate shell/powershell installer scripts - Create GitHub releases with all artifacts Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
3 similar comments
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
…erences cargo-dist expects single quotes in the release.yml tag pattern, but dprint formats it with double quotes. Adding allow-dirty = ["ci"] tells cargo-dist to ignore this formatting difference. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
feat(granola): add cargo-dist for per-platform binary builds and npm package
Summary
Replaces the manual npm package infrastructure with cargo-dist, which provides automated per-platform binary builds and multiple installation methods including npm/npx access.
Files added:
dist-workspace.toml- cargo-dist configuration with npm, shell, and powershell installers.github/workflows/release.yml- Auto-generated GitHub Actions workflow for releasesapps/granola/README.md- Documentation with multiple installation methodsFiles removed (replaced by cargo-dist):
apps/granola/package.jsonapps/granola/bin/export-granola.jsapps/granola/scripts/postinstall.jsCargo.toml updates:
[profile.dist]for optimized release builds with LTO[package.metadata.dist]to granola-cli withdist = trueandnpm-package = "export-granola"dist = falseensures only granola-cli is distributed (monorepo setup)Installation methods provided:
npx export-granola- npm/npx accessSupported platforms: macOS (x64/arm64), Linux (x64/arm64), Windows (x64)
Updates since last revision
release.ymlworkflow builds binaries for all platforms and creates GitHub releases when version tags are pusheddist = falseat workspace level so only granola-cli is distributed, not other workspace binariesallow-dirty = ["ci"]: Workaround for dprint/cargo-dist formatting conflict (dprint uses double quotes in YAML, cargo-dist generates single quotes). This tells cargo-dist to skip validation of the CI file contents.Review & Testing Checklist for Human
granola-cli/0.1.0orv0.1.0to verify binaries build correctly for all platformsNPM_TOKENsecret to be configured in GitHub Actions for publishing to npm. Verify this exists or create it.**[0-9]+.[0-9]+.[0-9]+*. Verify this won't conflict with existing release workflows (e.g.,desktop_cd.yamlusesdesktop_v*tags)npm-package = "export-granola"correctly sets the npm package name after a real releasenpx export-granola --helpafter the first release is published to npmRecommended test plan:
release.ymlworkflowgranola-cli/0.1.0to trigger the release workflownpx export-granola --helpNotes
dist planon PRs to validate configuration without building (now passing afterallow-dirtyfix)allow-dirty = ["ci"]setting means cargo-dist won't error if the release.yml drifts from its expected formatLink to Devin run: https://app.devin.ai/sessions/df74732fbe2642a39d87592d30473dc3
Previous Devin run: https://app.devin.ai/sessions/7aef1b61107c43ce91d59688afdeb56e
Requested by: yujonglee (@yujonglee)