-
Notifications
You must be signed in to change notification settings - Fork 0
Explore additional publishing platforms #5
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
base: master
Are you sure you want to change the base?
Explore additional publishing platforms #5
Conversation
- Add crates.io metadata (repository, keywords, categories) to Cargo.toml - Add cargo-binstall support for fast binary installation - Create PKGBUILD for Arch Linux (AUR) distribution - Create npm wrapper package with automatic binary downloader - Update .gitignore to include npm/bin directory Publishing options now available: - cargo install bun-docs-mcp-proxy (from source) - cargo binstall bun-docs-mcp-proxy (pre-built binaries) - npm install -g bun-docs-mcp-proxy (Node.js users) - yay -S bun-docs-mcp-proxy (Arch Linux)
- Add publish-npm job that runs after GitHub release is created - Update npm install.js to use correct archive naming from releases - Add support for Windows zip extraction via PowerShell - Add .npmignore to exclude binaries (downloaded via postinstall) - npm package downloads appropriate binary during postinstall When a tag is pushed, the workflow will: 1. Build binaries for all platforms 2. Create GitHub Release with binaries 3. Publish to crates.io 4. Publish to npm (package downloads from GitHub Releases)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Claude finished @kjanat's task —— View job Analysis of Additional Packaging ToolsGreat question! Let me analyze how these tools would fit with your current PR:
Tool Analysis1. cargo-bundle (crates.io)Purpose: Creates platform-specific application bundles (macOS Pros:
Cons:
Recommendation: ❌ Skip - Your GitHub Actions workflow already provides cross-platform binaries. cargo-bundle adds complexity without significant benefit for a CLI tool. 2. cargo-deb (crates.io)Purpose: Creates Debian/Ubuntu Pros:
Cons:
Recommendation: ✅ Consider adding - This would provide a professional installation path for Debian/Ubuntu users. It's complementary to your existing solutions:
3. cargo-aur (crates.io)Purpose: Automates AUR package generation and submission for Arch Linux Pros:
Cons:
Recommendation:
Summary & Recommendations
Implementation SuggestionIf you want to add cargo-deb, here's what you'd need:
[package.metadata.deb]
maintainer = "Your Name <your.email@example.com>"
copyright = "2025, Your Name <your.email@example.com>"
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
["target/release/bun-docs-mcp-proxy", "usr/bin/", "755"],
["README.md", "usr/share/doc/bun-docs-mcp-proxy/", "644"],
["LICENSE", "usr/share/doc/bun-docs-mcp-proxy/", "644"],
]
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Build .deb package
run: cargo deb --target x86_64-unknown-linux-gnu
- name: Upload .deb to release
# Add to release artifacts
Final RecommendationFor this PR: Keep it as-is with the current scope (crates.io, npm, AUR via PKGBUILD, cargo-binstall). This already provides excellent multi-platform coverage. Future enhancement: Consider adding cargo-deb in a separate PR if you get requests from Debian/Ubuntu users who prefer native Skip: cargo-bundle (unmaintained, redundant) and cargo-aur (manual PKGBUILD is better). |
- Add cargo-deb metadata to Cargo.toml for .deb package generation - Add cargo-aur metadata to Cargo.toml for AUR package generation - Create package-deb job in release workflow (x86_64 and ARM64) - Create package-aur job to generate PKGBUILD and source tarball - Update release job to include .deb packages and AUR artifacts - Update release notes with package manager installation options Distribution options now include: - Debian/Ubuntu: .deb packages for x86_64 and ARM64 - Arch Linux: Auto-generated PKGBUILD and source tarball - All packages include attestations and checksums Users can install with: - cargo install bun-docs-mcp-proxy (from source) - cargo binstall bun-docs-mcp-proxy (pre-built) - npm install -g bun-docs-mcp-proxy (Node.js) - sudo dpkg -i bun-docs-mcp-proxy_x86_64.deb (Debian/Ubuntu) - makepkg -si (Arch Linux, using included PKGBUILD)
This comment was marked as outdated.
This comment was marked as outdated.
CRITICAL SECURITY FIXES:
- Add SHA256 checksum verification to npm install script (npm/scripts/install.js:98-153)
* Downloads SHA256SUMS file from release
* Calculates checksum of downloaded archive
* Verifies before extraction to prevent supply chain attacks
- Remove manual PKGBUILD with sha256sums=('SKIP')
* cargo-aur auto-generates PKGBUILD with proper checksums
* Eliminates conflicting sources of truth
HIGH PRIORITY FIXES:
- Fix cargo-binstall URL template mismatch (Cargo.toml:70-94)
* Add platform-specific overrides to match actual release naming
* e.g., linux-x86_64 instead of x86_64-unknown-linux-gnu
* Ensures `cargo binstall` can correctly locate binaries
- Add verification step before npm publish (release.yml:310-324)
* Waits 30s for release asset propagation
* Verifies SHA256SUMS and key binaries are accessible
* Prevents race condition where npm package publishes before binaries are available
IMPROVEMENTS:
- Update Node.js engine requirement from >=14 to >=18 (Node 14 EOL April 2023)
- Improve error handling in extract functions
* Separate try/catch blocks for extraction vs binary location
* More specific error messages for each failure mode
* Better guidance for users when errors occur
Security verification workflow:
1. Download archive from GitHub Release
2. Download SHA256SUMS file
3. Calculate actual checksum of archive
4. Compare and fail if mismatch
5. Only extract if verification succeeds
This addresses all critical security concerns from PR review.
Pull Request Review: Multi-Platform Publishing SupportSummaryThis PR adds comprehensive publishing infrastructure for crates.io, npm, Debian/Ubuntu, and Arch Linux. Well-structured with good security practices. Code Quality: Excellent ✅Strengths:
Minor Issues:
Security: Strong ✅Excellent practices:
Recommendations:
Performance: Good ✅
GitHub Actions: Well Designed ✅Strengths:
Concerns:
Test Coverage: Gap Identified
|
This pull request adds automated publishing workflows and package metadata to support distribution of the
bun-docs-mcp-proxyvia crates.io, npm, and Arch Linux (AUR). It also introduces a cross-platform npm package with a post-install script that downloads pre-built binaries for various platforms, and improves documentation and metadata for easier installation and discovery.Automated publishing and packaging:
npm package support:
npm/package.jsondefining the npm package, including metadata, binary entry point, and a postinstall script for downloading platform-specific binaries.npm/scripts/install.jsscript that automatically downloads and extracts the correct binary for the user's OS/architecture during npm install, with fallback instructions for unsupported platforms.npm/.npmignoreto exclude native binaries from the npm package, ensuring only the wrapper and installer scripts are shipped.npm/README.mdwith installation instructions, usage, supported platforms, and alternative installation methods.Rust crate metadata and packaging:
Cargo.tomlwith repository, homepage, keywords, categories, and metadata forcargo-binstall, improving discoverability and enabling binary distribution viacargo-binstall. [1] [2]Arch Linux packaging:
PKGBUILDfile for Arch Linux users, enabling installation from the AUR and providing build, test, and packaging steps for the proxy.