-
-
Notifications
You must be signed in to change notification settings - Fork 496
Add Homebrew Cask for macOS install #595
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
Changes from all commits
a2a63ea
5dfb0ad
f7c2dc3
a989fd6
b16b762
636425c
29feb11
c421334
814b065
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| name: Publish to Homebrew Tap | ||
|
|
||
| on: | ||
| release: | ||
| types: [released] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Release tag (e.g. v1.8.3)' | ||
| required: true | ||
|
|
||
| jobs: | ||
| update-cask: | ||
| name: Update Homebrew Cask | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Resolve release tag | ||
| id: tag | ||
| env: | ||
| INPUT_TAG: ${{ github.event.inputs.tag }} | ||
| RELEASE_TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [ -n "$INPUT_TAG" ]; then | ||
| TAG="$INPUT_TAG" | ||
| else | ||
| TAG="$RELEASE_TAG" | ||
| fi | ||
| if [ -z "$TAG" ]; then | ||
| echo "No tag resolved from event inputs" >&2 | ||
| exit 1 | ||
| fi | ||
| VERSION="${TAG#v}" | ||
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "Resolved tag=$TAG version=$VERSION" | ||
|
|
||
| - name: Download macOS DMGs | ||
| env: | ||
| REPO: ${{ github.repository }} | ||
| TAG: ${{ steps.tag.outputs.tag }} | ||
| VERSION: ${{ steps.tag.outputs.version }} | ||
| run: | | ||
| set -euo pipefail | ||
| BASE="https://github.com/${REPO}/releases/download/${TAG}" | ||
| curl -fSL -o arm64.dmg "${BASE}/GitHub-Store-${VERSION}-arm64.dmg" | ||
| curl -fSL -o x64.dmg "${BASE}/GitHub-Store-${VERSION}-x64.dmg" | ||
| ls -la *.dmg | ||
|
|
||
| - name: Compute SHA256 | ||
| id: hash | ||
| run: | | ||
| set -euo pipefail | ||
| SHA_ARM=$(sha256sum arm64.dmg | awk '{print $1}') | ||
| SHA_X64=$(sha256sum x64.dmg | awk '{print $1}') | ||
| echo "arm=$SHA_ARM" >> "$GITHUB_OUTPUT" | ||
| echo "intel=$SHA_X64" >> "$GITHUB_OUTPUT" | ||
| echo "arm64=$SHA_ARM" | ||
| echo "x64=$SHA_X64" | ||
|
|
||
| - name: Checkout tap repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: OpenHub-Store/homebrew-tap | ||
| token: ${{ secrets.HOMEBREW_TAP_TOKEN }} | ||
| path: homebrew-tap | ||
|
|
||
| - name: Patch cask | ||
| working-directory: homebrew-tap | ||
| env: | ||
| NEW_VERSION: ${{ steps.tag.outputs.version }} | ||
| NEW_SHA_ARM: ${{ steps.hash.outputs.arm }} | ||
| NEW_SHA_INTEL: ${{ steps.hash.outputs.intel }} | ||
| run: | | ||
| python3 - <<'EOF' | ||
| import os, re, sys | ||
| path = "Casks/github-store.rb" | ||
| version = os.environ["NEW_VERSION"] | ||
| sha_arm = os.environ["NEW_SHA_ARM"] | ||
| sha_intel = os.environ["NEW_SHA_INTEL"] | ||
| text = open(path).read() | ||
|
|
||
| new_text, n_v = re.subn(r'version\s+"[^"]+"', f'version "{version}"', text, count=1) | ||
| if n_v != 1: | ||
| print("Failed to patch version stanza", file=sys.stderr) | ||
| sys.exit(1) | ||
|
|
||
| pattern = re.compile( | ||
| r'sha256 arm:\s+"[0-9a-f]+",\s*\n\s*intel:\s+"[0-9a-f]+"' | ||
| ) | ||
| replacement = ( | ||
| f'sha256 arm: "{sha_arm}",\n' | ||
| f' intel: "{sha_intel}"' | ||
| ) | ||
| new_text, n_s = pattern.subn(replacement, new_text, count=1) | ||
| if n_s != 1: | ||
| print("Failed to patch sha256 stanza", file=sys.stderr) | ||
| sys.exit(1) | ||
|
|
||
| open(path, "w").write(new_text) | ||
| print("Patched cask:") | ||
| print(new_text) | ||
| EOF | ||
|
|
||
| - name: Commit + push | ||
| working-directory: homebrew-tap | ||
| env: | ||
| VERSION: ${{ steps.tag.outputs.version }} | ||
| run: | | ||
| set -euo pipefail | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add Casks/github-store.rb | ||
| if git diff --cached --quiet; then | ||
| echo "Cask already up to date" | ||
| exit 0 | ||
| fi | ||
| git commit -m "Bump github-store to ${VERSION}" | ||
| git push | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Every locale's
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. False positive. 18.json corresponds to unreleased versionCode 18 (1.8.3). The Cask is at 1.8.2 (versionCode 17) because that's the currently shipped release. The What's New sheet only renders after a user installs the versionCode 18 build, so the sheet and the installed app version will match in practice — they're never displayed together at version 17. PR body has been updated to consistently say 1.8.3 (the earlier 1.9.0 wording was a session-level scoping question that got resolved). gradle/libs.versions.toml bump is handled by the user as part of the actual release cut, not this PR. |
||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "macOS install via Homebrew — `brew install --cask github-store` from our new tap." | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "التثبيت على macOS عبر Homebrew — `brew install --cask github-store` من المستودع الجديد." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Homebrew দিয়ে macOS-এ ইনস্টল করুন — আমাদের নতুন tap থেকে `brew install --cask github-store`।" | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Instalación en macOS con Homebrew — `brew install --cask github-store` desde nuestro nuevo tap." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Installation macOS via Homebrew — `brew install --cask github-store` depuis notre nouveau tap." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "macOS पर Homebrew से इंस्टॉल — हमारे नए tap से `brew install --cask github-store`।" | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Installazione macOS con Homebrew — `brew install --cask github-store` dal nostro nuovo tap." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Homebrew で macOS にインストール — 新しい tap から `brew install --cask github-store`。" | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Homebrew로 macOS에 설치 — 새 tap에서 `brew install --cask github-store`." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Instalacja na macOS przez Homebrew — `brew install --cask github-store` z naszego nowego tap." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "Установка на macOS через Homebrew — `brew install --cask github-store` из нашего нового tap." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "macOS'ta Homebrew ile kurulum — yeni tap'imizden `brew install --cask github-store`." | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "versionCode": 18, | ||
| "versionName": "1.8.3", | ||
| "releaseDate": "2026-05-14", | ||
| "showAsSheet": true, | ||
| "sections": [ | ||
| { | ||
| "type": "NEW", | ||
| "bullets": [ | ||
| "通过 Homebrew 在 macOS 上安装 — 从我们的新 tap 运行 `brew install --cask github-store`。" | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| cask "github-store" do | ||
| arch arm: "arm64", intel: "x64" | ||
|
|
||
| version "1.8.2" | ||
| sha256 arm: "ad0c532873c0400736b7ea706a33604f7ef93b2479a4a6f32673a789b18ccd8e", | ||
| intel: "faf002283c301db2a97f7a32193778f678d42ed71551a623711cd170d6fde16a" | ||
|
|
||
| url "https://github.com/OpenHub-Store/GitHub-Store/releases/download/v#{version}/GitHub-Store-#{version}-#{arch}.dmg" | ||
| name "GitHub Store" | ||
| desc "Cross-platform app store for GitHub releases" | ||
| homepage "https://github.com/OpenHub-Store/GitHub-Store" | ||
|
|
||
| livecheck do | ||
| url :url | ||
| strategy :github_latest | ||
| end | ||
|
|
||
| auto_updates false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed false is correct here. The macOS desktop build has no self-updater that replaces the .app binary — "self-update" references in the codebase are all Android-side (Shizuku reinstall + lifecycle handling). On desktop, the user upgrades via brew upgrade --cask github-store. Keeping auto_updates false. |
||
| depends_on macos: :big_sur | ||
|
|
||
| app "GitHub-Store.app" | ||
|
|
||
| uninstall quit: "zed.rainxch.githubstore" | ||
|
|
||
| zap trash: [ | ||
| "~/Library/Application Support/GitHub-Store", | ||
| "~/Library/Caches/GitHub-Store", | ||
| "~/Library/Logs/GitHub-Store", | ||
| "~/Library/Preferences/zed.rainxch.githubstore.plist", | ||
| "~/Library/Saved Application State/zed.rainxch.githubstore.savedState", | ||
| ] | ||
|
|
||
| caveats <<~EOS | ||
| GitHub Store is not yet signed with an Apple Developer ID. | ||
| macOS Gatekeeper will block it from launching with a "damaged" or | ||
| "cannot be opened" error. | ||
|
|
||
| To allow the app to launch, run: | ||
|
|
||
| xattr -dr com.apple.quarantine "#{appdir}/GitHub-Store.app" | ||
|
|
||
| This step is required after each install or upgrade until the app is | ||
| signed and notarized. | ||
| EOS | ||
| end | ||
Uh oh!
There was an error while loading. Please reload this page.