diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index d131c1a..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d885be..3d9b23d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,3 +140,84 @@ jobs: artifacts/opencli-rs-*.zip artifacts/opencli-rs-chrome-extension.zip artifacts/SHA256SUMS.txt + + update-homebrew: + name: Update Homebrew Formula + needs: [release] + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: opencli-rs-* + path: artifacts + merge-multiple: true + + - name: Checkout Homebrew tap + uses: actions/checkout@v4 + with: + repository: nashsu/homebrew-opencli-rs + token: ${{ secrets.HOMEBREW_TAP_TOKEN }} + path: homebrew-tap + + - name: Update formula + run: | + VERSION="${GITHUB_REF_NAME#v}" + RELEASE_URL_BASE="https://github.com/nashsu/opencli-rs/releases/download/v${VERSION}" + SHA_MACOS_ARM=$(sha256sum artifacts/opencli-rs-aarch64-apple-darwin.tar.gz | awk '{print $1}') + SHA_MACOS_INTEL=$(sha256sum artifacts/opencli-rs-x86_64-apple-darwin.tar.gz | awk '{print $1}') + SHA_LINUX_ARM=$(sha256sum artifacts/opencli-rs-aarch64-unknown-linux-musl.tar.gz | awk '{print $1}') + SHA_LINUX_INTEL=$(sha256sum artifacts/opencli-rs-x86_64-unknown-linux-musl.tar.gz | awk '{print $1}') + + mkdir -p homebrew-tap/Formula + cat > homebrew-tap/Formula/opencli-rs.rb < **ファイルは1つだけ、ダウンロードすればすぐ使えます。** Node.js、Python やその他のランタイムは不要、PATH に配置するだけで実行可能。 +### Homebrew(macOS / Linux) + +```bash +brew tap nashsu/opencli-rs +brew install opencli-rs +``` + ### ワンライナーインストールスクリプト(macOS / Linux) ```bash diff --git a/README.md b/README.md index f214fe8..6eb5441 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,13 @@ A **complete rewrite in pure Rust** based on [OpenCLI](https://github.com/jackwe ## Installation > **Just one file, download and use.** No Node.js, Python, or any runtime needed — just put it in your PATH and go. +### Homebrew (macOS / Linux) + +```bash +brew tap nashsu/opencli-rs +brew install opencli-rs +``` + ### One-line Install Script (macOS / Linux) ```bash diff --git a/README.zh.md b/README.zh.md index d32c955..8c4adfd 100644 --- a/README.zh.md +++ b/README.zh.md @@ -57,6 +57,13 @@ ## 安装 > **只有一个文件,下载即可使用。** 无需 Node.js、Python 或任何运行时,放到 PATH 里就能跑。 +### Homebrew(macOS / Linux) + +```bash +brew tap nashsu/opencli-rs +brew install opencli-rs +``` + ### 一键安装脚本(macOS / Linux) ```bash