Skip to content

feat: add Homebrew formula and Scoop manifest with automated release workflow - #1

Open
NanamiMio wants to merge 1 commit into
pt-plugins:masterfrom
NanamiMio:master
Open

feat: add Homebrew formula and Scoop manifest with automated release workflow#1
NanamiMio wants to merge 1 commit into
pt-plugins:masterfrom
NanamiMio:master

Conversation

@NanamiMio

Copy link
Copy Markdown

Summary

This PR adds native package manager support for Homebrew (macOS / Linux) and Scoop (Windows), along with automated manifest updates in the GitHub Actions release workflow.

1. Homebrew Formula (Formula/ptd-cli.rb)

  • Pre-compiled binary distribution for 4 target architectures:
    • macOS: aarch64-apple-darwin (Apple Silicon), x86_64-apple-darwin (Intel)
    • Linux: aarch64-unknown-linux-gnu (ARM64), x86_64-unknown-linux-gnu (x86_64)
  • Zero build dependencies (rust/llvm not required), instant installation in < 1s.
  • Installs both ptd and ptd-host.
  • Written using an idiomatic SHA256S Map structure.

2. Scoop Manifest (bucket/ptd-cli.json)

  • Direct binary zip distribution for Windows x86_64-pc-windows-msvc.
  • Includes autoupdate and checkver configuration.

3. Automated Release Workflow (.github/workflows/release.yml)

  • Automatically computes SHA256 checksums for all 5 release artifacts upon release / tag push.
  • In-place updates Formula/ptd-cli.rb and bucket/ptd-cli.json with the new version and SHA256 hashes.
  • Commits and pushes both manifest updates in a single atomic commit [skip ci].
  • Keeps source files as the single source of truth without duplicating templates.

4. Documentation

  • Updated README.md and README.en.md with installation commands:
    # Homebrew
    brew tap pt-plugins/ptd-cli https://github.com/pt-plugins/ptd-cli
    brew install ptd-cli
    
    # Scoop
    scoop bucket add ptd-cli https://github.com/pt-plugins/ptd-cli
    scoop install ptd-cli

概述(中文)

本 PR 为 ptd-cli 增加了 Homebrew (macOS/Linux)Scoop (Windows) 包管理器支持,并集成了 Release CI 自动更新机制:

  1. Homebrew Formula (Formula/ptd-cli.rb):支持 macOS 及 Linux 的 ARM64 与 x86_64 预编译二进制分发,0 构建依赖,秒级安装。
  2. Scoop Manifest (bucket/ptd-cli.json):支持 Windows 64位预编译 Zip 安装与自动更新检测。
  3. Release CI 自动化 (.github/workflows/release.yml):发版时自动计算各平台 SHA256,原地更新 Formula 与 Scoop Manifest,并在单次原子 Commit 内推回主分支。
  4. 文档更新:更新中英文 README 中的安装指南。

…workflow

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Rhilip
Rhilip requested a review from LeiShi1313 August 21, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant