Skip to content
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

Please support homebrew install #1

Open
Alphabet1226 opened this issue Jan 23, 2023 · 20 comments
Open

Please support homebrew install #1

Alphabet1226 opened this issue Jan 23, 2023 · 20 comments
Labels
enhancement New feature or request help wanted

Comments

@Alphabet1226
Copy link

No description provided.

@Alphabet1226 Alphabet1226 added the enhancement New feature or request label Jan 23, 2023
@github-actions
Copy link

Hello Alphabet1226, Thank you for your first issue contribution 🎉

@tisfeng
Copy link
Owner

tisfeng commented Jan 23, 2023

好的,稍后我查一下看怎么支持 homebrew,这是我第一次开发 Mac 软件,对 Mac 生态还不太熟悉 😓

@Alphabet1226
Copy link
Author

已经很棒了,非常非常喜欢你的作品,加油!第一次开发 Mac 软件就这么高水准真是太厉害了!

@tisfeng tisfeng added the P2 label Jan 24, 2023
@BingoKingo
Copy link

BingoKingo commented Feb 26, 2023

很棒,从bob社区版来的,希望能够把免费版维护下去:
Homebrew/homebrew-cask#141992

brew install easydict

@tisfeng
Copy link
Owner

tisfeng commented Feb 26, 2023

非常感谢!我还在想稍后熟悉一下 homebrew,没想到你已经提交 PR 支持了,太好了 🥳

@ViGeng
Copy link

ViGeng commented Mar 5, 2023

很棒,从bob社区版来的,希望能够把免费版维护下去: Homebrew/homebrew-cask#141992

brew install easydict

太给力了,正想这么个事儿呢👍 就已经办了

@tisfeng tisfeng closed this as completed Mar 10, 2023
@tisfeng tisfeng reopened this Apr 17, 2023
@Jerry23011
Copy link
Collaborator

刚刚看了一下 brew,如果 Cask 有更新是需要有人去开新的 PR 的

@tisfeng
Copy link
Owner

tisfeng commented Apr 28, 2023

可以帮忙提去那边供个更新 PR 吗,我观摩一下,之前没弄过这个 🧐

@Jerry23011
Copy link
Collaborator

Jerry23011 commented Apr 28, 2023

可以帮忙提去那边供个更新 PR 吗,我观摩一下,之前没弄过这个 🧐

我也是现看的,之前没弄过,还想问问前面的知不知道 😭

@Jerry23011
Copy link
Collaborator

手动 PR 了一个,希望没问题
Homebrew/homebrew-cask#146098

@tisfeng
Copy link
Owner

tisfeng commented Apr 28, 2023

感谢!

@tisfeng tisfeng closed this as completed Apr 28, 2023
@catch6
Copy link

catch6 commented Oct 11, 2023

这完全可以整个 Github action 自动在release 的时候提交 PR给 homebrew 啊,人工维护后面时间成本太高,而且容易漏掉

@Jerry23011 Jerry23011 reopened this Oct 11, 2023
@BingoKingo
Copy link

BingoKingo commented Oct 11, 2023

Try brew bump --open-pr easydict.

@tisfeng
Copy link
Owner

tisfeng commented Oct 14, 2023

这里确实可以用 Github Action 自动化处理,但我对这一块不太熟悉,还在学习阶段,有小伙伴来帮忙一下吗?

@wytsai7660
Copy link

我想正確的安裝指令應該是 brew install --cask easydictREADME.md 可能需要更新一下。

@tisfeng
Copy link
Owner

tisfeng commented Jan 7, 2024

感谢,我更新一下。

@pencilheart
Copy link

来源于chatgpt,不知道可用不?@tisfeng

要实现一个 GitHub Action,当你发布一个新版本时自动运行 brew bump --open-pr easydict,你可以按以下步骤操作:

  1. 创建 GitHub Action 配置文件

    在你的 GitHub 仓库中,导航到 .github/workflows/ 目录。如果没有这个目录,可以新建一个。然后在该目录下创建一个 .yml 文件,比如 brew-bump.yml

  2. 编写 GitHub Action 配置文件

    编辑 brew-bump.yml 文件,内容可以如下:

    name: Brew Bump
    
    on:
      release:
        types: [published]
    
    jobs:
      brew-bump:
        runs-on: ubuntu-latest
    
        steps:
        - name: Checkout repository
          uses: actions/checkout@v3
    
        - name: Set up Homebrew
          run: |
            sudo apt-get update
            sudo apt-get install -y build-essential curl file git
            /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
            echo "eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" >> ~/.bashrc
            eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
            brew install gh
    
        - name: Bump Homebrew formula
          run: |
            brew bump --open-pr easydict

    解释:

    • name: 设置工作流的名称为 "Brew Bump"。
    • on: 配置触发条件。release 事件中的 published 类型意味着每当你在仓库中发布新版本时,这个 Action 就会触发。
    • jobs: 定义要运行的工作,这里我们命名为 brew-bump
    • runs-on: 设置 GitHub Action 的运行环境,这里我们选择 ubuntu-latest
    • steps: 定义了一系列步骤:
      • Checkout repository: 使用 actions/checkout@v3 检出仓库代码。
      • Set up Homebrew: 安装并配置 Homebrew 环境。
      • Bump Homebrew formula: 执行 brew bump --open-pr easydict 命令。
  3. 推送配置文件到你的仓库

    brew-bump.yml 文件推送到你的 GitHub 仓库。每当你发布新版本时,GitHub Action 将自动运行,并执行 brew bump --open-pr easydict 命令。

这样,GitHub Action 将会在你发布新版本时自动运行 brew bump --open-pr easydict 命令,并创建一个新的 PR。

@tisfeng
Copy link
Owner

tisfeng commented Aug 12, 2024

ok,感谢,我稍后尝试一下。

@tisfeng
Copy link
Owner

tisfeng commented Sep 15, 2024

试了一下,似乎不行。

另外上面的 action 具体也没看出哪里有相关的更新信息,我期望的自动化脚本,应该能一条龙服务,根据 GitHub 版本发布记录获取更本信息、sha256 等,并自动向官方 homebrew-cask 提交一个 PR。

这个可能有点复杂了,我对 brew 和 GitHub Action 不太熟,不清楚该如何做到。

@tisfeng
Copy link
Owner

tisfeng commented Sep 15, 2024

我参考官方教程 How-To-Open-a-Homebrew-Pull-Request ,在本地使用以下命令弄了一个更新 PR Homebrew/homebrew-cask#185454 ,似乎还行 😐

brew bump-cask-pr --version=2.9.0 --sha256 84cd3d438a7dfc6829f008dfdd1fbeb846815d862428edc42db0dbbc5cff2387 easydict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted
Projects
None yet
Development

No branches or pull requests

8 participants